2 ms·
I use -Weverything and turn off two warnings by pragma, which are -Wpadded, the one that generated your last warning, and -Wc++98-compat because I use `alignof(
by gavinhoward 4y ago
I use -Weverything and turn off two warnings by pragma, which are -Wpadded, the one that generated your last warning, and -Wc++98-compat because I use `alignof()`.
The pragmas may not be portable, but that doesn't matter in this specific case. I surround them with the equivalent of:
#ifdef __clang__
#pragma clang ...
#endif // __clang__
It works fine.
Also, I like the style where declarations come first, so I leave that warning on. It's actually useful to me. (Probably not to anyone else, though.)