clang++ some_c++11_source.cpp -std=c++11 -Weverything -Werror

Hi,

Why does Weverything include Wc++98-compat when -std=c++11 is applyed?

What other warnings are completly useless when I want to write a c++11 code?

More info here:
http://stackoverflow.com/questions/14181789/how-to-use-clang-with-std-c11-weverything-werror

Regards,
Kocka

-Weverything literally means "everything". -Wc++98-compat is a warning
and is hence part of "everything". Just disable it with
-Wno-c++98-compat (along with any other warnings you run into).

-- Sean Silva

-Weverything literally means “everything”. -Wc++98-compat is a warning
and is hence part of “everything”. Just disable it with
-Wno-c++98-compat (along with any other warnings you run into).

– Sean Silva

The important point here is that one might want to compile as C++11 to benefit from optimizations (such as move constructors) whilst still retaining a codebase compatible with older compilers. Therefore it does make sense for c++98-compat to be active even in C++11 mode; after all, in C++98, you would not need it!

– Matthieu