diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 651a8c38..62ef0af7 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -168,7 +168,7 @@ // Variadic templates compiler: // http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html -# if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) +# if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__)) # define BOOST_HAS_VARIADIC_TMPL # else # define BOOST_NO_VARIADIC_TEMPLATES @@ -183,15 +183,9 @@ # define BOOST_NO_CHAR16_T # define BOOST_NO_CHAR32_T # define BOOST_NO_INITIALIZER_LISTS -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) -// -// These appear to always be available in GCC-4.4.x regardless of -// whether we are in C++ 0x mode or not: -// # define BOOST_NO_DEFAULTED_FUNCTIONS # define BOOST_NO_DELETED_FUNCTIONS #endif -#endif #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) # define BOOST_NO_SFINAE_EXPR @@ -200,11 +194,8 @@ // C++0x features in 4.5.0 and later // #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) -// These two appear to be always available: # define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_LAMBDAS -#endif # define BOOST_NO_RAW_LITERALS # define BOOST_NO_UNICODE_LITERALS #endif diff --git a/test/boost_no_defaulted_functions.ipp b/test/boost_no_defaulted_functions.ipp index b7c5c9a7..c571cc23 100644 --- a/test/boost_no_defaulted_functions.ipp +++ b/test/boost_no_defaulted_functions.ipp @@ -10,6 +10,10 @@ // TITLE: C++0x defaulted functions unavailable // DESCRIPTION: The compiler does not support C++0x defaulted functions +#if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) +# error Defaulted functions aren't really supported in non-C++0x mode +#endif + namespace boost_no_defaulted_functions { struct foo { diff --git a/test/boost_no_deleted_functions.ipp b/test/boost_no_deleted_functions.ipp index 072e0f95..dac4972b 100644 --- a/test/boost_no_deleted_functions.ipp +++ b/test/boost_no_deleted_functions.ipp @@ -10,6 +10,10 @@ // TITLE: C++0x =delete functions unavailable // DESCRIPTION: The compiler does not support C++0x =delete functions +#if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) +# error Deleted functions aren't really supported in non-C++0x mode +#endif + namespace boost_no_deleted_functions { struct foo { diff --git a/test/boost_no_explicit_cvt_ops.ipp b/test/boost_no_explicit_cvt_ops.ipp index 2293c247..c370e440 100644 --- a/test/boost_no_explicit_cvt_ops.ipp +++ b/test/boost_no_explicit_cvt_ops.ipp @@ -10,6 +10,10 @@ // TITLE: C++0x explicit conversion operators unavailable // DESCRIPTION: The compiler does not support C++0x explicit conversion operators +#if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) +# error This feature isn't really available in non-C++0x mode +#endif + namespace boost_no_explicit_conversion_operators { struct foo { diff --git a/test/boost_no_lambdas.ipp b/test/boost_no_lambdas.ipp index 1d9285f0..d02da69c 100644 --- a/test/boost_no_lambdas.ipp +++ b/test/boost_no_lambdas.ipp @@ -10,6 +10,10 @@ // TITLE: C++0x lambda feature unavailable // DESCRIPTION: The compiler does not support the C++0x lambda feature +#if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) +# error This feature isn't really available in non-C++0x mode +#endif + namespace boost_no_lambdas { int test()