
On Wed, Mar 16, 2011 at 11:33 AM, John Maddock <boost.regex@virgin.net> wrote:
/home/hunold/src/devel/boost/boost/type_traits/common_type.hpp:70:22: warning: variadic templates only available with -std=c++0x or -std=gnu++0x /home/hunold/src/devel/boost/boost/type_traits/common_type.hpp:150:46: warning: variadic templates only available with -std=c++0x or -std=gnu++0x
as soon as TypeTraits are used. This ist gcc-4.5, gcc-4.4 and gcc-4.6 (Mingw)
OK here's the lowdown:
GCC *does* support a number of C++0x features in non-C++0x mode, including variadic templates... that's because these features are used within the std lib.... but... gcc emits copious warnings if you use these features without turning off all warnings from the header that uses them with #pragma system_header. This also causes some of the type_traits tests to fail because they're run with warnings-as-errors. Oh and there's no way to selectively turn these warnings off, or to selectively turn them into errors :-(
FWIW, Clang (2.9, top-of-tree) does the same thing, but there you can use -Werror=c++0x-extensions . - Doug