From cea06346a2c4a0a680c7ffe755e6feaf745d0d9d Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Thu, 5 Jun 2014 21:47:53 +0200 Subject: [PATCH 1/4] Add support for VC++ 14 All the config tests pass, with the exception of the user-defined literal test, which passes only if "static constexpr" is substituted with "static BOOST_CONSTEXPR_OR_CONST" and "constexpr" is substituted with "BOOST_CONSTEXPR". See http://blogs.msdn.com/b/vcblog/archive/2014/06/03/visual-studio-14-ctp.aspx and http://blogs.msdn.com/b/somasegar/archive/2014/05/28/first-preview-of-visual-studio-quot-14-quot-available-now.aspx --- include/boost/config/compiler/visualc.hpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 842f0865..ffb3661c 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -168,18 +168,23 @@ # define BOOST_NO_CXX11_DECLTYPE_N3276 #endif +// C++11 features supported by VC++ 14 CTP1. +// +#if _MSC_FULL_VER < 190021730 +# define BOOST_NO_CXX11_NOEXCEPT +# define BOOST_NO_CXX11_REF_QUALIFIERS +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +# define BOOST_NO_CXX11_ALIGNAS +# define BOOST_NO_CXX11_INLINE_NAMESPACES +#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_NOEXCEPT -#define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX11_INLINE_NAMESPACES // // prefix and suffix headers: @@ -243,6 +248,8 @@ # define BOOST_COMPILER_VERSION 11.0 # elif _MSC_VER < 1900 # define BOOST_COMPILER_VERSION 12.0 +# elif _MSC_VER < 2000 +# define BOOST_COMPILER_VERSION 14.0 # else # define BOOST_COMPILER_VERSION _MSC_VER # endif @@ -252,8 +259,8 @@ #endif // -// last known and checked version is 18.00.20827.3 (VC12 RC, aka 2013 RC): -#if (_MSC_VER > 1800 && _MSC_FULL_VER > 180020827) +// last known and checked version is 18.00.21730.1 (VC14 CTP1): +#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190021730) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # else From 2bbe588a3f37382a4a25707be2dd7463cc57bc2d Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Fri, 6 Jun 2014 09:53:14 +0200 Subject: [PATCH 2/4] Add BOOST_MSVC_ENABLE_2014_JUN_CTP marco Disables new features supplied by VC++ 14 CTP1 by default --- include/boost/config/compiler/visualc.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index ffb3661c..cef7a4b7 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -168,9 +168,11 @@ # define BOOST_NO_CXX11_DECLTYPE_N3276 #endif -// C++11 features supported by VC++ 14 CTP1. +// C++11 features supported by VC++ 14 CTP1 +// Because the CTP is unsupported, unrelease, and only alpha quality, +// it is only supported if BOOST_MSVC_ENABLE_2014_JUN_CTP is defined. // -#if _MSC_FULL_VER < 190021730 +#if (_MSC_FULL_VER < 190021730) || !defined(BOOST_MSVC_ENABLE_2014_JUN_CTP) # define BOOST_NO_CXX11_NOEXCEPT # define BOOST_NO_CXX11_REF_QUALIFIERS # define BOOST_NO_CXX11_USER_DEFINED_LITERALS From 6fdfceaefaf1a84d2ba659767d63735abea47243 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 8 Jun 2014 03:25:16 +0300 Subject: [PATCH 3/4] Run config_test and config_info with no RTTI and no exceptions. --- test/Jamfile.v2 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index ec1df035..14056326 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -48,9 +48,25 @@ test-suite config linux:-lpthread linux:-lrt gcc:$(OTHERFLAGS) + ] + [ run config_test.cpp + : #args + : #input-files + : #requirements + off + : config_test_no_rtti + ] + [ run config_test.cpp + : #args + : #input-files + : #requirements + off + : config_test_no_except ] [ run config_info.cpp : : : always_show_run_output single msvc:static msvc:static ] [ run config_info.cpp : : : always_show_run_output multi : config_info_threaded ] + [ run config_info.cpp : : : always_show_run_output off : config_info_no_rtti ] + [ run config_info.cpp : : : always_show_run_output off : config_info_no_except ] [ run math_info.cpp : : : always_show_run_output borland:static borland:static ] [ run abi/abi_test.cpp abi/main.cpp ] [ run limits_test.cpp ../../test/build//boost_test_exec_monitor ] From db9540d98dd79b0967e71ac04bb65632aacf89b1 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 8 Jun 2014 04:25:59 +0300 Subject: [PATCH 4/4] Add a few more g++ and Intel predefined macros to config_info. --- test/config_info.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/config_info.cpp b/test/config_info.cpp index cefc75ff..d8393462 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -192,6 +192,7 @@ void print_compiler_macros() PRINT_MACRO(__hppa); PRINT_MACRO(__CYGWIN__); PRINT_MACRO(__MINGW32__); + PRINT_MACRO(__GXX_RTTI); // HP aCC: PRINT_MACRO(__HP_aCC); PRINT_MACRO(_HPACC_); @@ -293,6 +294,8 @@ void print_compiler_macros() PRINT_MACRO(_OPENMPT); PRINT_MACRO(_PGO_INSTRUMENT); PRINT_MACRO(__QMSPP_); + PRINT_MACRO(__INTEL_RTTI__); + PRINT_MACRO(__INTEL_CXX11_MODE__); // Cray options: PRINT_MACRO(_CRAYC);