From 55fa3a8e88f7f1e921fef6de43fcfd826ce63b0c Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Thu, 17 Jan 2013 02:18:31 +0000 Subject: [PATCH] Add BOOST_MSVC_ENABLE_2012_NOV_CTP macro to allow users to explicitly enable use of VC++ November 2012 Community Technology Preview. C++11 features supplied by this CTP are not enabled by default since they represent unsupported alpha-level code that should not be used for production work. [SVN r82514] --- .../boost_config/boost_macro_reference.html | 19 ++++++++++++++ doc/html/index.html | 2 +- doc/macro_reference.qbk | 9 +++++++ include/boost/config/compiler/visualc.hpp | 25 +++++++++++-------- 4 files changed, 43 insertions(+), 12 deletions(-) diff --git a/doc/html/boost_config/boost_macro_reference.html b/doc/html/boost_config/boost_macro_reference.html index 2551eaa3..5c39fd61 100644 --- a/doc/html/boost_config/boost_macro_reference.html +++ b/doc/html/boost_config/boost_macro_reference.html @@ -3105,6 +3105,25 @@ + + +

+ BOOST_MSVC_ENABLE_2012_NOV_CTP +

+ + +

+ For Microsoft Visual C++ 2012, enable the C++11 features supplied + by the November 2012 Community Technology Preview. These features + are not automatically enabled because the CTP is non-supported + alpha code that is not recommended for production use. This macro + must be defined before including any Boost headers, and must be + defined for all translation units in the program, including Boost + library builds. This macro will no longer have any effect once + an official Microsoft release supports the CTP features. +

+ + diff --git a/doc/html/index.html b/doc/html/index.html index 9f42997b..7bfddf23 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -951,7 +951,7 @@ - +

Last revised: January 03, 2013 at 13:01:40 GMT

Last revised: January 17, 2013 at 02:10:17 GMT


diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index 77971e57..89bd4754 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -724,6 +724,15 @@ If `BOOST_NO_CXX11_NOEXCEPT` is not defined (i.e. C++11 compliant compilers) the `` ] ]] +[[`BOOST_MSVC_ENABLE_2012_NOV_CTP`][ +For Microsoft Visual C++ 2012, enable the C++11 features supplied by the +November 2012 Community Technology Preview. These features are not automatically +enabled because the CTP is non-supported alpha code that is not recommended +for production use. This macro must be defined before including any Boost headers, +and must be defined for all translation units in the program, including Boost library builds. +This macro will no longer have any effect once an official Microsoft +release supports the CTP features. +]] ] [endsect] diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index aa4584df..89c0f050 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -134,10 +134,6 @@ // (Niels Dekker, LKEB, May 2010) # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -#if _MSC_VER < 1600 || !defined(BOOST_STRICT_CONFIG) // 150X == VC++ 9.0 -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#endif - #ifndef _NATIVE_WCHAR_T_DEFINED # define BOOST_NO_INTRINSIC_WCHAR_T #endif @@ -221,24 +217,31 @@ # define BOOST_NO_CXX11_SCOPED_ENUMS #endif // _MSC_VER < 1700 -// C++0x features not supported by any versions +// C++11 features supported by VC++ 11 (aka 2012) November 2012 CTP +// Because the CTP is unsupported, unrelease, and only alpha quality, +// it is only supported if BOOST_ENABLE_MSVC_2012_NOV_CTP is defined. +// +#if _MSC_FULL_VER < 170051025 || !defined(BOOST_MSVC_ENABLE_2012_NOV_CTP) +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +# define BOOST_NO_CXX11_RAW_LITERALS +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#endif + +// C++11 features not supported by any versions #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX + // // prefix and suffix headers: //