From 115746bcedbde494adc2540ca1e26b4aaea7812a Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Thu, 26 Mar 2009 19:00:00 +0000 Subject: [PATCH] Added configuration macros BOOST_NO_AUTO_DECLARATIONS and BOOST_NO_AUTO_MULTIDECLARATIONS. [SVN r51992] --- doc/macro_reference.qbk | 6 ++ include/boost/config/compiler/borland.hpp | 42 +++++++------ include/boost/config/compiler/codegear.hpp | 62 ++++++++++--------- include/boost/config/compiler/common_edg.hpp | 28 +++++---- include/boost/config/compiler/digitalmars.hpp | 28 +++++---- include/boost/config/compiler/gcc.hpp | 29 +++++---- include/boost/config/compiler/hp_acc.hpp | 28 +++++---- include/boost/config/compiler/intel.hpp | 28 +++++---- include/boost/config/compiler/metrowerks.hpp | 26 ++++---- include/boost/config/compiler/mpw.hpp | 28 +++++---- include/boost/config/compiler/pgi.hpp | 28 +++++---- include/boost/config/compiler/sgi_mipspro.hpp | 28 +++++---- include/boost/config/compiler/sunpro_cc.hpp | 28 +++++---- include/boost/config/compiler/vacpp.hpp | 28 +++++---- include/boost/config/compiler/visualc.hpp | 34 +++++----- test/all/Jamfile.v2 | 8 ++- test/boost_no_auto_declarations.ipp | 25 ++++++++ test/boost_no_auto_multidecl.ipp | 25 ++++++++ test/config_info.cpp | 3 + test/config_test.cpp | 22 ++++++- test/no_auto_declarations_fail.cpp | 37 +++++++++++ test/no_auto_declarations_pass.cpp | 37 +++++++++++ test/no_auto_multidecl_fail.cpp | 37 +++++++++++ test/no_auto_multidecl_pass.cpp | 37 +++++++++++ 24 files changed, 474 insertions(+), 208 deletions(-) create mode 100644 test/boost_no_auto_declarations.ipp create mode 100644 test/boost_no_auto_multidecl.ipp create mode 100644 test/no_auto_declarations_fail.cpp create mode 100644 test/no_auto_declarations_pass.cpp create mode 100644 test/no_auto_multidecl_fail.cpp create mode 100644 test/no_auto_multidecl_pass.cpp diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index 17dcf597..9ef6402f 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -524,6 +524,12 @@ that are not yet supported by a particular compiler. [table [[Macro ][Description ]] +[[`BOOST_NO_AUTO_DECLARATIONS`][The compiler does not support +type deduction for variables declared with the `auto` keyword (`auto var = ...;`). +]] +[[`BOOST_NO_AUTO_MULTIDECLARATIONS`][The compiler does not support +type deduction for multiple variables declared with the `auto` keyword (`auto var = ..., *ptr = ...;`). +]] [[`BOOST_NO_CHAR16_T`][The compiler does not support type `char16_t`. ]] diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index 02d35fe8..c6413b3a 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -151,31 +151,33 @@ # define BOOST_HAS_RVALUE_REFS # define BOOST_HAS_STATIC_ASSERT -# define BOOST_NO_EXTERN_TEMPLATE -# define BOOST_NO_SCOPED_ENUMS +# define BOOST_NO_EXTERN_TEMPLATE +# define BOOST_NO_SCOPED_ENUMS # define BOOST_NO_VARIADIC_TEMPLATES -# define BOOST_NO_CONSTEXPR -# define BOOST_NO_DEFAULTED_FUNCTIONS -# define BOOST_NO_DELETED_FUNCTIONS -# define BOOST_NO_RAW_LITERALS -# define BOOST_NO_UNICODE_LITERALS // UTF-8 still not supported +# define BOOST_NO_CONSTEXPR +# define BOOST_NO_DEFAULTED_FUNCTIONS +# define BOOST_NO_DELETED_FUNCTIONS +# define BOOST_NO_RAW_LITERALS +# define BOOST_NO_UNICODE_LITERALS // UTF-8 still not supported #else -# define BOOST_NO_CHAR16_T -# define BOOST_NO_CHAR32_T -# define BOOST_NO_DECLTYPE -# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -# define BOOST_NO_EXTERN_TEMPLATE -# define BOOST_NO_SCOPED_ENUMS -# define BOOST_NO_STATIC_ASSERT -# define BOOST_NO_RVALUE_REFERENCES +# define BOOST_NO_CHAR16_T +# define BOOST_NO_CHAR32_T +# define BOOST_NO_DECLTYPE +# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_EXTERN_TEMPLATE +# define BOOST_NO_SCOPED_ENUMS +# define BOOST_NO_STATIC_ASSERT +# define BOOST_NO_RVALUE_REFERENCES # define BOOST_NO_VARIADIC_TEMPLATES -# define BOOST_NO_CONSTEXPR -# define BOOST_NO_DEFAULTED_FUNCTIONS -# define BOOST_NO_DELETED_FUNCTIONS -# define BOOST_NO_RAW_LITERALS -# define BOOST_NO_UNICODE_LITERALS +# define BOOST_NO_CONSTEXPR +# define BOOST_NO_DEFAULTED_FUNCTIONS +# define BOOST_NO_DELETED_FUNCTIONS +# define BOOST_NO_RAW_LITERALS +# define BOOST_NO_UNICODE_LITERALS #endif +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS #define BOOST_NO_INITIALIZER_LISTS #if __BORLANDC__ >= 0x590 diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index 026ea7d1..803d17a0 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -62,44 +62,46 @@ // // C++0x macros: // -# define BOOST_HAS_CHAR16_T -# define BOOST_HAS_CHAR32_T -# define BOOST_HAS_LONG_LONG -//# define BOOST_HAS_ALIGNOF -# define BOOST_HAS_DECLTYPE -# define BOOST_HAS_EXPLICIT_CONVERSION_OPS -//# define BOOST_HAS_RVALUE_REFS -# define BOOST_HAS_SCOPED_ENUM -//# define BOOST_HAS_STATIC_ASSERT -# define BOOST_HAS_STD_TYPE_TRAITS +#define BOOST_HAS_CHAR16_T +#define BOOST_HAS_CHAR32_T +#define BOOST_HAS_LONG_LONG +// #define BOOST_HAS_ALIGNOF +#define BOOST_HAS_DECLTYPE +#define BOOST_HAS_EXPLICIT_CONVERSION_OPS +// #define BOOST_HAS_RVALUE_REFS +#define BOOST_HAS_SCOPED_ENUM +// #define BOOST_HAS_STATIC_ASSERT +#define BOOST_HAS_STD_TYPE_TRAITS -# define BOOST_NO_EXTERN_TEMPLATE -# define BOOST_NO_SCOPED_ENUMS -# define BOOST_NO_STATIC_ASSERT -# define BOOST_NO_RVALUE_REFERENCES -# define BOOST_NO_VARIADIC_TEMPLATES -# define BOOST_NO_CONSTEXPR -# define BOOST_NO_DEFAULTED_FUNCTIONS -# define BOOST_NO_DELETED_FUNCTIONS -# define BOOST_NO_RAW_LITERALS -# define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS // // TR1 macros: // -# define BOOST_HAS_TR1_HASH -# define BOOST_HAS_TR1_TYPE_TRAITS -# define BOOST_HAS_TR1_UNORDERED_MAP -# define BOOST_HAS_TR1_UNORDERED_SET +#define BOOST_HAS_TR1_HASH +#define BOOST_HAS_TR1_TYPE_TRAITS +#define BOOST_HAS_TR1_UNORDERED_MAP +#define BOOST_HAS_TR1_UNORDERED_SET -# define BOOST_HAS_MACRO_USE_FACET +#define BOOST_HAS_MACRO_USE_FACET -# define BOOST_NO_INITIALIZER_LISTS +#define BOOST_NO_INITIALIZER_LISTS - // On non-Win32 platforms let the platform config figure this out: -# ifdef _WIN32 -# define BOOST_HAS_STDINT_H -# endif +// On non-Win32 platforms let the platform config figure this out: +#ifdef _WIN32 +# define BOOST_HAS_STDINT_H +#endif // // __int64: diff --git a/include/boost/config/compiler/common_edg.hpp b/include/boost/config/compiler/common_edg.hpp index 8d31e332..3e62bb0f 100644 --- a/include/boost/config/compiler/common_edg.hpp +++ b/include/boost/config/compiler/common_edg.hpp @@ -64,20 +64,22 @@ // // See above for BOOST_NO_LONG_LONG // -#define BOOST_NO_CHAR16_T -#define BOOST_NO_CHAR32_T -#define BOOST_NO_CONSTEXPR -#define BOOST_NO_DECLTYPE -#define BOOST_NO_DEFAULTED_FUNCTIONS -#define BOOST_NO_DELETED_FUNCTIONS -#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_RAW_LITERALS -#define BOOST_NO_RVALUE_REFERENCES -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_STATIC_ASSERT -#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_UNICODE_LITERALS #define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS #ifdef c_plusplus // EDG has "long long" in non-strict mode // However, some libraries have insufficient "long long" support diff --git a/include/boost/config/compiler/digitalmars.hpp b/include/boost/config/compiler/digitalmars.hpp index 43fa2352..5984312b 100644 --- a/include/boost/config/compiler/digitalmars.hpp +++ b/include/boost/config/compiler/digitalmars.hpp @@ -59,20 +59,22 @@ // // C++0x features // -#define BOOST_NO_CHAR16_T -#define BOOST_NO_CHAR32_T -#define BOOST_NO_CONSTEXPR -#define BOOST_NO_DECLTYPE -#define BOOST_NO_DEFAULTED_FUNCTIONS -#define BOOST_NO_DELETED_FUNCTIONS -#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_RAW_LITERALS -#define BOOST_NO_RVALUE_REFERENCES -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_STATIC_ASSERT -#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_UNICODE_LITERALS #define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS #if __DMC__ < 0x800 #error "Compiler not supported or configured - please reconfigure" #endif diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 671fa229..439153ce 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -105,16 +105,18 @@ // C++0x features // -#define BOOST_NO_CHAR16_T -#define BOOST_NO_CHAR32_T -#define BOOST_NO_CONSTEXPR -#define BOOST_NO_DEFAULTED_FUNCTIONS -#define BOOST_NO_DELETED_FUNCTIONS -#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_RAW_LITERALS -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_UNICODE_LITERALS +// See below for BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__) // C++0x features are only enabled when -std=c++0x or -std=gnu++0x are @@ -124,13 +126,14 @@ # define BOOST_HAS_RVALUE_REFS # define BOOST_HAS_STATIC_ASSERT #else -# define BOOST_NO_DECLTYPE -# define BOOST_NO_RVALUE_REFERENCES -# define BOOST_NO_STATIC_ASSERT +# define BOOST_NO_DECLTYPE +# define BOOST_NO_RVALUE_REFERENCES +# define BOOST_NO_STATIC_ASSERT #endif #if !defined(__GXX_EXPERIMENTAL_CXX0X__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) # define BOOST_NO_INITIALIZER_LISTS +# define BOOST_NO_AUTO_DECLARATIONS #endif // Variadic templates compiler: diff --git a/include/boost/config/compiler/hp_acc.hpp b/include/boost/config/compiler/hp_acc.hpp index fe8bcdd9..0c3cc9af 100644 --- a/include/boost/config/compiler/hp_acc.hpp +++ b/include/boost/config/compiler/hp_acc.hpp @@ -90,20 +90,22 @@ // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // -#define BOOST_NO_CHAR16_T -#define BOOST_NO_CHAR32_T -#define BOOST_NO_CONSTEXPR -#define BOOST_NO_DECLTYPE -#define BOOST_NO_DEFAULTED_FUNCTIONS -#define BOOST_NO_DELETED_FUNCTIONS -#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_RAW_LITERALS -#define BOOST_NO_RVALUE_REFERENCES -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_STATIC_ASSERT -#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_UNICODE_LITERALS #define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS // // last known and checked version for HP-UX/ia64 is 61300 diff --git a/include/boost/config/compiler/intel.hpp b/include/boost/config/compiler/intel.hpp index b7b918c1..e4d1b07d 100644 --- a/include/boost/config/compiler/intel.hpp +++ b/include/boost/config/compiler/intel.hpp @@ -162,20 +162,22 @@ template<> struct assert_intrinsic_wchar_t {}; // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // -#define BOOST_NO_CHAR16_T -#define BOOST_NO_CHAR32_T -#define BOOST_NO_CONSTEXPR -#define BOOST_NO_DECLTYPE -#define BOOST_NO_DEFAULTED_FUNCTIONS -#define BOOST_NO_DELETED_FUNCTIONS -#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_RAW_LITERALS -#define BOOST_NO_RVALUE_REFERENCES -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_STATIC_ASSERT -#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_UNICODE_LITERALS #define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS // // last known and checked version: diff --git a/include/boost/config/compiler/metrowerks.hpp b/include/boost/config/compiler/metrowerks.hpp index a3464fd9..5f6e0fe5 100644 --- a/include/boost/config/compiler/metrowerks.hpp +++ b/include/boost/config/compiler/metrowerks.hpp @@ -91,19 +91,21 @@ #else # define BOOST_NO_RVALUE_REFERENCES #endif -#define BOOST_NO_CHAR16_T -#define BOOST_NO_CHAR32_T -#define BOOST_NO_CONSTEXPR -#define BOOST_NO_DECLTYPE -#define BOOST_NO_DEFAULTED_FUNCTIONS -#define BOOST_NO_DELETED_FUNCTIONS -#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_RAW_LITERALS -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_STATIC_ASSERT -#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_UNICODE_LITERALS #define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS #define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) diff --git a/include/boost/config/compiler/mpw.hpp b/include/boost/config/compiler/mpw.hpp index b3eeb5cf..1d724065 100644 --- a/include/boost/config/compiler/mpw.hpp +++ b/include/boost/config/compiler/mpw.hpp @@ -41,20 +41,22 @@ // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // -#define BOOST_NO_CHAR16_T -#define BOOST_NO_CHAR32_T -#define BOOST_NO_CONSTEXPR -#define BOOST_NO_DECLTYPE -#define BOOST_NO_DEFAULTED_FUNCTIONS -#define BOOST_NO_DELETED_FUNCTIONS -#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_RAW_LITERALS -#define BOOST_NO_RVALUE_REFERENCES -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_STATIC_ASSERT -#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_UNICODE_LITERALS #define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS // // versions check: diff --git a/include/boost/config/compiler/pgi.hpp b/include/boost/config/compiler/pgi.hpp index ec007162..ce09e2aa 100644 --- a/include/boost/config/compiler/pgi.hpp +++ b/include/boost/config/compiler/pgi.hpp @@ -33,20 +33,22 @@ // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // -#define BOOST_NO_CHAR16_T -#define BOOST_NO_CHAR32_T -#define BOOST_NO_CONSTEXPR -#define BOOST_NO_DECLTYPE -#define BOOST_NO_DEFAULTED_FUNCTIONS -#define BOOST_NO_DELETED_FUNCTIONS -#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_RAW_LITERALS -#define BOOST_NO_RVALUE_REFERENCES -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_STATIC_ASSERT -#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_UNICODE_LITERALS #define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS // // version check: diff --git a/include/boost/config/compiler/sgi_mipspro.hpp b/include/boost/config/compiler/sgi_mipspro.hpp index b237f85b..f6a86ad5 100644 --- a/include/boost/config/compiler/sgi_mipspro.hpp +++ b/include/boost/config/compiler/sgi_mipspro.hpp @@ -28,20 +28,22 @@ // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // -#define BOOST_NO_CHAR16_T -#define BOOST_NO_CHAR32_T -#define BOOST_NO_CONSTEXPR -#define BOOST_NO_DECLTYPE -#define BOOST_NO_DEFAULTED_FUNCTIONS -#define BOOST_NO_DELETED_FUNCTIONS -#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_RAW_LITERALS -#define BOOST_NO_RVALUE_REFERENCES -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_STATIC_ASSERT -#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_UNICODE_LITERALS #define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS // // version check: diff --git a/include/boost/config/compiler/sunpro_cc.hpp b/include/boost/config/compiler/sunpro_cc.hpp index f650ece9..6553a465 100644 --- a/include/boost/config/compiler/sunpro_cc.hpp +++ b/include/boost/config/compiler/sunpro_cc.hpp @@ -86,20 +86,22 @@ # define BOOST_NO_LONG_LONG #endif -#define BOOST_NO_CHAR16_T -#define BOOST_NO_CHAR32_T -#define BOOST_NO_CONSTEXPR -#define BOOST_NO_DECLTYPE -#define BOOST_NO_DEFAULTED_FUNCTIONS -#define BOOST_NO_DELETED_FUNCTIONS -#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_RAW_LITERALS -#define BOOST_NO_RVALUE_REFERENCES -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_STATIC_ASSERT -#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_UNICODE_LITERALS #define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS // // Version diff --git a/include/boost/config/compiler/vacpp.hpp b/include/boost/config/compiler/vacpp.hpp index 3d0be10b..eb75cdbf 100644 --- a/include/boost/config/compiler/vacpp.hpp +++ b/include/boost/config/compiler/vacpp.hpp @@ -61,20 +61,22 @@ // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // -#define BOOST_NO_CHAR16_T -#define BOOST_NO_CHAR32_T -#define BOOST_NO_CONSTEXPR -#define BOOST_NO_DECLTYPE -#define BOOST_NO_DEFAULTED_FUNCTIONS -#define BOOST_NO_DELETED_FUNCTIONS -#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_RAW_LITERALS -#define BOOST_NO_RVALUE_REFERENCES -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_STATIC_ASSERT -#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_UNICODE_LITERALS #define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index ac361229..552e5bb1 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -146,21 +146,27 @@ // C++0x features // // See above for BOOST_NO_LONG_LONG +#define BOOST_NO_CHAR16_T +#define BOOST_NO_CHAR32_T +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_DECLTYPE +#define BOOST_NO_DEFAULTED_FUNCTIONS +#define BOOST_NO_DELETED_FUNCTIONS +#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +#define BOOST_NO_EXTERN_TEMPLATE +#define BOOST_NO_RAW_LITERALS +#define BOOST_NO_SCOPED_ENUMS +#define BOOST_NO_UNICODE_LITERALS +#define BOOST_NO_VARIADIC_TEMPLATES + +// MSVC 2010 CTP has some support for C++0x, but we still disable it until the compiler release +// #if _MSC_VER < 1600 +#define BOOST_NO_RVALUE_REFERENCES +#define BOOST_NO_STATIC_ASSERT +#define BOOST_NO_AUTO_DECLARATIONS +#define BOOST_NO_AUTO_MULTIDECLARATIONS +// #endif // _MSC_VER < 1600 -#define BOOST_NO_CHAR16_T -#define BOOST_NO_CHAR32_T -#define BOOST_NO_CONSTEXPR -#define BOOST_NO_DECLTYPE -#define BOOST_NO_DEFAULTED_FUNCTIONS -#define BOOST_NO_DELETED_FUNCTIONS -#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_RAW_LITERALS -#define BOOST_NO_RVALUE_REFERENCES -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_STATIC_ASSERT -#define BOOST_NO_UNICODE_LITERALS -#define BOOST_NO_VARIADIC_TEMPLATES // // prefix and suffix headers: // diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index 69e7eb69..41477cae 100644 --- a/test/all/Jamfile.v2 +++ b/test/all/Jamfile.v2 @@ -1,7 +1,7 @@ # # Regression test Jamfile for boost configuration setup. # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Fri Feb 20 21:15:18 2009 +# This file was automatically generated on Sat Mar 21 15:13:32 2009 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -184,6 +184,12 @@ test-suite "BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP" : test-suite "BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS" : [ run ../no_array_type_spec_pass.cpp ] [ compile-fail ../no_array_type_spec_fail.cpp ] ; +test-suite "BOOST_NO_AUTO_DECLARATIONS" : +[ run ../no_auto_declarations_pass.cpp ] +[ compile-fail ../no_auto_declarations_fail.cpp ] ; +test-suite "BOOST_NO_AUTO_MULTIDECLARATIONS" : +[ run ../no_auto_multidecl_pass.cpp ] +[ compile-fail ../no_auto_multidecl_fail.cpp ] ; test-suite "BOOST_NO_AUTO_PTR" : [ run ../no_auto_ptr_pass.cpp ] [ compile-fail ../no_auto_ptr_fail.cpp ] ; diff --git a/test/boost_no_auto_declarations.ipp b/test/boost_no_auto_declarations.ipp new file mode 100644 index 00000000..be48ed3e --- /dev/null +++ b/test/boost_no_auto_declarations.ipp @@ -0,0 +1,25 @@ +// Copyright (C) 2009 Andrey Semashev +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for most recent version. + +// MACRO: BOOST_NO_AUTO_DECLARATIONS +// TITLE: C++0x auto declarators unavailable +// DESCRIPTION: The compiler does not support C++0x declarations of variables with automatically deduced type + +namespace boost_no_auto_declarations { + +void check(int& x) +{ +} + +int test() +{ + auto x = 10; + check(x); + return 0; +} + +} diff --git a/test/boost_no_auto_multidecl.ipp b/test/boost_no_auto_multidecl.ipp new file mode 100644 index 00000000..976d445a --- /dev/null +++ b/test/boost_no_auto_multidecl.ipp @@ -0,0 +1,25 @@ +// Copyright (C) 2009 Andrey Semashev +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for most recent version. + +// MACRO: BOOST_NO_AUTO_MULTIDECLARATIONS +// TITLE: C++0x auto multideclarators unavailable +// DESCRIPTION: The compiler does not support C++0x declarations of series of variables with automatically deduced type + +namespace boost_no_auto_multideclarations { + +void check(int& x, int*& y) +{ +} + +int test() +{ + auto x = 10, *y = &x; + check(x, y); + return 0; +} + +} diff --git a/test/config_info.cpp b/test/config_info.cpp index 1b75f8cf..1c9fcdc6 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -955,6 +955,8 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_ADL_BARRIER); PRINT_MACRO(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP); PRINT_MACRO(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS); + PRINT_MACRO(BOOST_NO_AUTO_DECLARATIONS); + PRINT_MACRO(BOOST_NO_AUTO_MULTIDECLARATIONS); PRINT_MACRO(BOOST_NO_AUTO_PTR); PRINT_MACRO(BOOST_NO_CHAR16_T); PRINT_MACRO(BOOST_NO_CHAR32_T); @@ -1034,6 +1036,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_VARIADIC_TEMPLATES); PRINT_MACRO(BOOST_NO_VOID_RETURNS); + // END GENERATED BLOCK PRINT_MACRO(BOOST_INTEL); diff --git a/test/config_test.cpp b/test/config_test.cpp index f9677e03..da884d7c 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Feb 20 21:15:18 2009 +// This file was automatically generated on Sat Mar 21 15:13:32 2009 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -37,6 +37,16 @@ namespace boost_no_argument_dependent_lookup = empty_boost; #else namespace boost_no_array_type_specializations = empty_boost; #endif +#ifndef BOOST_NO_AUTO_DECLARATIONS +#include "boost_no_auto_declarations.ipp" +#else +namespace boost_no_auto_declarations = empty_boost; +#endif +#ifndef BOOST_NO_AUTO_MULTIDECLARATIONS +#include "boost_no_auto_multidecl.ipp" +#else +namespace boost_no_auto_multideclarations = empty_boost; +#endif #ifndef BOOST_NO_AUTO_PTR #include "boost_no_auto_ptr.ipp" #else @@ -971,6 +981,16 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_no_auto_declarations::test()) + { + std::cerr << "Failed test for BOOST_NO_AUTO_DECLARATIONS at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } + if(0 != boost_no_auto_multideclarations::test()) + { + std::cerr << "Failed test for BOOST_NO_AUTO_MULTIDECLARATIONS at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_no_auto_ptr::test()) { std::cerr << "Failed test for BOOST_NO_AUTO_PTR at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/test/no_auto_declarations_fail.cpp b/test/no_auto_declarations_fail.cpp new file mode 100644 index 00000000..a8ba1e64 --- /dev/null +++ b/test/no_auto_declarations_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Mar 12 17:32:04 2009 +// by libs/config/tools/generate.cpp +// Copyright John Maddock 2002-4. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for the most recent version.// +// Revision $Id$ +// + + +// Test file for macro BOOST_NO_AUTO_DECLARATIONS +// This file should not compile, if it does then +// BOOST_NO_AUTO_DECLARATIONS should not be defined. +// See file boost_no_auto_declarations.ipp for details + +// Must not have BOOST_ASSERT_CONFIG set; it defeats +// the objective of this file: +#ifdef BOOST_ASSERT_CONFIG +# undef BOOST_ASSERT_CONFIG +#endif + +#include +#include "test.hpp" + +#ifdef BOOST_NO_AUTO_DECLARATIONS +#include "boost_no_auto_declarations.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_auto_declarations::test(); +} + diff --git a/test/no_auto_declarations_pass.cpp b/test/no_auto_declarations_pass.cpp new file mode 100644 index 00000000..2b479013 --- /dev/null +++ b/test/no_auto_declarations_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Mar 12 17:32:04 2009 +// by libs/config/tools/generate.cpp +// Copyright John Maddock 2002-4. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for the most recent version.// +// Revision $Id$ +// + + +// Test file for macro BOOST_NO_AUTO_DECLARATIONS +// This file should compile, if it does not then +// BOOST_NO_AUTO_DECLARATIONS should be defined. +// See file boost_no_auto_declarations.ipp for details + +// Must not have BOOST_ASSERT_CONFIG set; it defeats +// the objective of this file: +#ifdef BOOST_ASSERT_CONFIG +# undef BOOST_ASSERT_CONFIG +#endif + +#include +#include "test.hpp" + +#ifndef BOOST_NO_AUTO_DECLARATIONS +#include "boost_no_auto_declarations.ipp" +#else +namespace boost_no_auto_declarations = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_auto_declarations::test(); +} + diff --git a/test/no_auto_multidecl_fail.cpp b/test/no_auto_multidecl_fail.cpp new file mode 100644 index 00000000..3d028b40 --- /dev/null +++ b/test/no_auto_multidecl_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Mar 12 17:32:04 2009 +// by libs/config/tools/generate.cpp +// Copyright John Maddock 2002-4. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for the most recent version.// +// Revision $Id$ +// + + +// Test file for macro BOOST_NO_AUTO_MULTIDECLARATIONS +// This file should not compile, if it does then +// BOOST_NO_AUTO_MULTIDECLARATIONS should not be defined. +// See file boost_no_auto_multidecl.ipp for details + +// Must not have BOOST_ASSERT_CONFIG set; it defeats +// the objective of this file: +#ifdef BOOST_ASSERT_CONFIG +# undef BOOST_ASSERT_CONFIG +#endif + +#include +#include "test.hpp" + +#ifdef BOOST_NO_AUTO_MULTIDECLARATIONS +#include "boost_no_auto_multidecl.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_auto_multideclarations::test(); +} + diff --git a/test/no_auto_multidecl_pass.cpp b/test/no_auto_multidecl_pass.cpp new file mode 100644 index 00000000..d845232f --- /dev/null +++ b/test/no_auto_multidecl_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Mar 12 17:32:04 2009 +// by libs/config/tools/generate.cpp +// Copyright John Maddock 2002-4. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for the most recent version.// +// Revision $Id$ +// + + +// Test file for macro BOOST_NO_AUTO_MULTIDECLARATIONS +// This file should compile, if it does not then +// BOOST_NO_AUTO_MULTIDECLARATIONS should be defined. +// See file boost_no_auto_multidecl.ipp for details + +// Must not have BOOST_ASSERT_CONFIG set; it defeats +// the objective of this file: +#ifdef BOOST_ASSERT_CONFIG +# undef BOOST_ASSERT_CONFIG +#endif + +#include +#include "test.hpp" + +#ifndef BOOST_NO_AUTO_MULTIDECLARATIONS +#include "boost_no_auto_multidecl.ipp" +#else +namespace boost_no_auto_multideclarations = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_auto_multideclarations::test(); +} +