mirror of
https://github.com/boostorg/config.git
synced 2025-07-31 21:04:28 +02:00
Don't enable GCC C++0x features in non-C++0x mode.
Update tests to actually fail unless we're in C++0x mode. Fixes #5320. Fixes #5319. [SVN r70019]
This commit is contained in:
@@ -168,7 +168,7 @@
|
|||||||
|
|
||||||
// Variadic templates compiler:
|
// Variadic templates compiler:
|
||||||
// http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html
|
// 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
|
# define BOOST_HAS_VARIADIC_TMPL
|
||||||
# else
|
# else
|
||||||
# define BOOST_NO_VARIADIC_TEMPLATES
|
# define BOOST_NO_VARIADIC_TEMPLATES
|
||||||
@@ -183,15 +183,9 @@
|
|||||||
# define BOOST_NO_CHAR16_T
|
# define BOOST_NO_CHAR16_T
|
||||||
# define BOOST_NO_CHAR32_T
|
# define BOOST_NO_CHAR32_T
|
||||||
# define BOOST_NO_INITIALIZER_LISTS
|
# 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_DEFAULTED_FUNCTIONS
|
||||||
# define BOOST_NO_DELETED_FUNCTIONS
|
# define BOOST_NO_DELETED_FUNCTIONS
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)
|
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)
|
||||||
# define BOOST_NO_SFINAE_EXPR
|
# define BOOST_NO_SFINAE_EXPR
|
||||||
@@ -200,11 +194,8 @@
|
|||||||
// C++0x features in 4.5.0 and later
|
// 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) || !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_EXPLICIT_CONVERSION_OPERATORS
|
||||||
# define BOOST_NO_LAMBDAS
|
# define BOOST_NO_LAMBDAS
|
||||||
#endif
|
|
||||||
# define BOOST_NO_RAW_LITERALS
|
# define BOOST_NO_RAW_LITERALS
|
||||||
# define BOOST_NO_UNICODE_LITERALS
|
# define BOOST_NO_UNICODE_LITERALS
|
||||||
#endif
|
#endif
|
||||||
|
@@ -10,6 +10,10 @@
|
|||||||
// TITLE: C++0x defaulted functions unavailable
|
// TITLE: C++0x defaulted functions unavailable
|
||||||
// DESCRIPTION: The compiler does not support C++0x defaulted functions
|
// 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 {
|
namespace boost_no_defaulted_functions {
|
||||||
|
|
||||||
struct foo {
|
struct foo {
|
||||||
|
@@ -10,6 +10,10 @@
|
|||||||
// TITLE: C++0x =delete functions unavailable
|
// TITLE: C++0x =delete functions unavailable
|
||||||
// DESCRIPTION: The compiler does not support C++0x =delete functions
|
// 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 {
|
namespace boost_no_deleted_functions {
|
||||||
|
|
||||||
struct foo {
|
struct foo {
|
||||||
|
@@ -10,6 +10,10 @@
|
|||||||
// TITLE: C++0x explicit conversion operators unavailable
|
// TITLE: C++0x explicit conversion operators unavailable
|
||||||
// DESCRIPTION: The compiler does not support C++0x explicit conversion operators
|
// 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 {
|
namespace boost_no_explicit_conversion_operators {
|
||||||
|
|
||||||
struct foo {
|
struct foo {
|
||||||
|
@@ -10,6 +10,10 @@
|
|||||||
// TITLE: C++0x lambda feature unavailable
|
// TITLE: C++0x lambda feature unavailable
|
||||||
// DESCRIPTION: The compiler does not support the C++0x lambda feature
|
// 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 {
|
namespace boost_no_lambdas {
|
||||||
|
|
||||||
int test()
|
int test()
|
||||||
|
Reference in New Issue
Block a user