From 5cb5c8e82d09bec55b8b778f3c7b9dba1d0ae6db Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 26 Sep 2016 17:15:19 -0400 Subject: [PATCH 01/15] .gitignore config/checks/architecture/bin/ --- checks/architecture/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 checks/architecture/.gitignore diff --git a/checks/architecture/.gitignore b/checks/architecture/.gitignore new file mode 100644 index 00000000..ba077a40 --- /dev/null +++ b/checks/architecture/.gitignore @@ -0,0 +1 @@ +bin From 4f974d28c13a58b280195a87c7faa57a403679c3 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 10 Nov 2016 10:48:32 +0000 Subject: [PATCH 02/15] Add missing "using testing;" --- checks/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checks/Jamfile.v2 b/checks/Jamfile.v2 index 1b5e2fd9..fc74ed39 100644 --- a/checks/Jamfile.v2 +++ b/checks/Jamfile.v2 @@ -9,7 +9,7 @@ import modules ; import path ; - +import testing ; rule run-simple ( requirements * : target-name ) { From 4749434d476ab23427fe727a5e42d52fe61d048d Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Mon, 14 Nov 2016 16:35:54 +0100 Subject: [PATCH 03/15] Update for Visual Studio 15 Preview 5 and RC - Aggregate NSDMI and relaxed constexpr are supported - _MSC_VER is 1910 --- include/boost/config/compiler/visualc.hpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 72caff49..cdbc9b67 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -190,6 +190,13 @@ # define BOOST_NO_CXX11_CONSTEXPR #endif +// C++14 features supported by VC++ 15 Preview 5 +// +#if (_MSC_VER < 1910) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +# define BOOST_NO_CXX14_CONSTEXPR +#endif + // MSVC including version 14 has not yet completely // implemented value-initialization, as is reported: // "VC++ does not value-initialize members of derived classes without @@ -210,14 +217,6 @@ // C++ 11: // #define BOOST_NO_TWO_PHASE_NAME_LOOKUP -// -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif // // prefix and suffix headers: @@ -294,8 +293,8 @@ #endif // -// last known and checked version is 19.00.23026 (VC++ 2015 RTM): -#if (_MSC_VER > 1900) +// last known and checked version is 19.10.24629 (VC++ 2017 RC): +#if (_MSC_VER > 1910) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # else From 4fc61307814b344ace6c21b54bf3bb73126c2224 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Mon, 21 Nov 2016 17:53:34 -0800 Subject: [PATCH 04/15] BOOST_NO_CXX17_STD_INVOKE for libc++ Make sure that BOOST_NO_CXX17_STD_INVOKE is defined for C++03/11/14 builds. --- include/boost/config/stdlib/libcpp.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/boost/config/stdlib/libcpp.hpp b/include/boost/config/stdlib/libcpp.hpp index 96cf57c3..21eafe89 100644 --- a/include/boost/config/stdlib/libcpp.hpp +++ b/include/boost/config/stdlib/libcpp.hpp @@ -73,8 +73,11 @@ #if _LIBCPP_VERSION < 3700 // libc++ uses a non-standard messages_base #define BOOST_NO_STD_MESSAGES +#endif + // C++17 features -#define BOOST_NO_CXX17_STD_INVOKE +#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L) +# define BOOST_NO_CXX17_STD_INVOKE #endif #if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL) From fa7121c0fea09600d62e59003d377e50f25e7eed Mon Sep 17 00:00:00 2001 From: akumta Date: Wed, 23 Nov 2016 08:17:25 -0800 Subject: [PATCH 05/15] Update sunpro_cc.hpp define BOOST_NO_CXX14_DECLTYPE_AUTO when C++14 standard is not in action --- include/boost/config/compiler/sunpro_cc.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/compiler/sunpro_cc.hpp b/include/boost/config/compiler/sunpro_cc.hpp index 8f07e0e9..ac259fce 100644 --- a/include/boost/config/compiler/sunpro_cc.hpp +++ b/include/boost/config/compiler/sunpro_cc.hpp @@ -152,7 +152,7 @@ #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif -#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) || (__cplusplus < 201402L) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if (__cplusplus < 201304) // There's no SD6 check for this.... From 0229c6e5cc123d3dde298589d0b074ef0c552738 Mon Sep 17 00:00:00 2001 From: Steve Mc Gregor Date: Fri, 2 Dec 2016 00:08:16 -0500 Subject: [PATCH 06/15] Adds .gitignore to prevent tracking changes of compiled files under checks/architecture/bin --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..17bac5cd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +checks/architecture/bin From 7a3fe1f8747a70c036b5728662547f706ac901eb Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Fri, 9 Dec 2016 01:11:53 +0900 Subject: [PATCH 07/15] Update c++14 constexpr test. Compiler should allow non-const member function. --- test/boost_no_cxx14_constexpr.ipp | 33 +++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/test/boost_no_cxx14_constexpr.ipp b/test/boost_no_cxx14_constexpr.ipp index 5dd43dfa..cc655270 100644 --- a/test/boost_no_cxx14_constexpr.ipp +++ b/test/boost_no_cxx14_constexpr.ipp @@ -1,5 +1,5 @@ -// (C) Copyright Kohei Takahashi 2014 +// (C) Copyright Kohei Takahashi 2014,2016 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file @@ -17,6 +17,15 @@ namespace boost_no_cxx14_constexpr namespace detail { template struct void_ { typedef void type; }; + + struct non_tmpl + { + constexpr int foo() const { return 1; } + constexpr int foo() { return 0; } + }; + + template + struct tmpl : non_tmpl { }; } // Test relaxed constexpr with dependent type; for more details, see comment of @@ -27,6 +36,17 @@ constexpr typename detail::void_::type decrement(T &value) --value; } +constexpr int non_cv_member(detail::non_tmpl x) +{ + return x.foo(); +} + +template +constexpr int non_cv_member(detail::tmpl x) +{ + return x.foo(); +} + constexpr int zero() { int ret = 1; @@ -34,9 +54,18 @@ constexpr int zero() return ret; } +template struct compile_time_value +{ + static constexpr int value = v; +}; + int test() { - return zero(); + return compile_time_value< + zero() + + non_cv_member(detail::non_tmpl()) + + non_cv_member(detail::tmpl()) + >::value; } } From d1c399f9714f9676c92906f6c500813ab6bfad7c Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 9 Dec 2016 18:10:32 +0000 Subject: [PATCH 08/15] Clang/libc++ : Tentatively enable and in C++03 mode. --- include/boost/config/stdlib/libcpp.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/boost/config/stdlib/libcpp.hpp b/include/boost/config/stdlib/libcpp.hpp index 21eafe89..dca0ea7b 100644 --- a/include/boost/config/stdlib/libcpp.hpp +++ b/include/boost/config/stdlib/libcpp.hpp @@ -32,10 +32,14 @@ #endif #if __cplusplus < 201103 -# define BOOST_NO_CXX11_HDR_ARRAY +// +// These two appear to be somewhat useable in C++03 mode, there may be others... +// +//# define BOOST_NO_CXX11_HDR_ARRAY +//# define BOOST_NO_CXX11_HDR_FORWARD_LIST + # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM From 68b7cc875927e203b3560d6cf21a1a65dc873a07 Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Sun, 11 Dec 2016 12:25:53 +0100 Subject: [PATCH 09/15] defect macro for C++17 feature `std::apply()` --- checks/Jamfile.v2 | 5 +-- checks/test_case.cpp | 6 +++- include/boost/config/stdlib/dinkumware.hpp | 1 + include/boost/config/stdlib/libcomo.hpp | 1 + include/boost/config/stdlib/libcpp.hpp | 3 ++ include/boost/config/stdlib/libstdcpp3.hpp | 3 ++ include/boost/config/stdlib/modena.hpp | 1 + include/boost/config/stdlib/msl.hpp | 1 + include/boost/config/stdlib/roguewave.hpp | 1 + include/boost/config/stdlib/sgi.hpp | 1 + include/boost/config/stdlib/stlport.hpp | 1 + include/boost/config/stdlib/vacpp.hpp | 1 + test/all/Jamfile.v2 | 5 ++- test/boost_no_cxx17_std_apply.ipp | 28 ++++++++++++++++ test/config_info.cpp | 2 ++ test/config_test.cpp | 12 ++++++- test/no_cxx17_std_apply_fail.cpp | 37 ++++++++++++++++++++++ test/no_cxx17_std_apply_pass.cpp | 37 ++++++++++++++++++++++ 18 files changed, 141 insertions(+), 5 deletions(-) create mode 100644 test/boost_no_cxx17_std_apply.ipp create mode 100644 test/no_cxx17_std_apply_fail.cpp create mode 100644 test/no_cxx17_std_apply_pass.cpp diff --git a/checks/Jamfile.v2 b/checks/Jamfile.v2 index fc74ed39..e39fa226 100644 --- a/checks/Jamfile.v2 +++ b/checks/Jamfile.v2 @@ -1,6 +1,6 @@ # # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Fri Oct 14 20:08:50 2016 +# This file was automatically generated on Sun Dec 11 12:22:05 2016 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -9,7 +9,7 @@ import modules ; import path ; -import testing ; + rule run-simple ( requirements * : target-name ) { @@ -131,6 +131,7 @@ run-simple TEST_BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES : cxx14_initi run-simple TEST_BOOST_NO_CXX14_AGGREGATE_NSDMI : cxx14_aggregate_nsdmi ; run-simple TEST_BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION : cxx14_return_type_deduction ; run-simple TEST_BOOST_NO_CXX14_VARIABLE_TEMPLATES : cxx14_variable_templates ; +run-simple TEST_BOOST_NO_CXX17_STD_APPLY : cxx17_std_apply ; run-simple TEST_BOOST_NO_CXX17_STD_INVOKE : cxx17_std_invoke ; run-simple TEST_BOOST_NO_CXX11_HDR_FUNCTIONAL : cxx11_hdr_functional ; run-simple TEST_BOOST_NO_CXX11_DECLTYPE : cxx11_decltype ; diff --git a/checks/test_case.cpp b/checks/test_case.cpp index d3ad56ca..caad5bbf 100644 --- a/checks/test_case.cpp +++ b/checks/test_case.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Oct 14 20:08:50 2016 +// This file was automatically generated on Sun Dec 11 12:22:05 2016 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -457,6 +457,10 @@ namespace test = boost_no_cxx14_return_type_deduction; # include "../test/boost_no_cxx14_var_templ.ipp" namespace test = boost_no_cxx14_variable_templates; #endif +#ifdef TEST_BOOST_NO_CXX17_STD_APPLY +# include "../test/boost_no_cxx17_std_apply.ipp" +namespace test = boost_no_cxx17_std_apply; +#endif #ifdef TEST_BOOST_NO_CXX17_STD_INVOKE # include "../test/boost_no_cxx17_std_invoke.ipp" namespace test = boost_no_cxx17_std_invoke; diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index 5f7a0321..6094bcc1 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -159,6 +159,7 @@ // C++17 features #if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) +# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE #endif diff --git a/include/boost/config/stdlib/libcomo.hpp b/include/boost/config/stdlib/libcomo.hpp index 07c48965..a7be537c 100644 --- a/include/boost/config/stdlib/libcomo.hpp +++ b/include/boost/config/stdlib/libcomo.hpp @@ -73,6 +73,7 @@ #endif // C++17 features +# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE // diff --git a/include/boost/config/stdlib/libcpp.hpp b/include/boost/config/stdlib/libcpp.hpp index dca0ea7b..d5d2fd61 100644 --- a/include/boost/config/stdlib/libcpp.hpp +++ b/include/boost/config/stdlib/libcpp.hpp @@ -83,6 +83,9 @@ #if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L) # define BOOST_NO_CXX17_STD_INVOKE #endif +#if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L) +# define BOOST_NO_CXX17_STD_APPLY +#endif #if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL) // This is a bit of a sledgehammer, because really it's just libc++abi that has no diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index d4596498..1cbebb87 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -261,6 +261,9 @@ #if (BOOST_LIBSTDCXX_VERSION < 60100) || (__cplusplus <= 201402L) # define BOOST_NO_CXX17_STD_INVOKE #endif +#if (BOOST_LIBSTDCXX_VERSION < 70100) || (__cplusplus <= 201402L) +# define BOOST_NO_CXX17_STD_APPLY +#endif #if defined(__has_include) #if !__has_include() diff --git a/include/boost/config/stdlib/modena.hpp b/include/boost/config/stdlib/modena.hpp index 7092e9ba..27ca4531 100644 --- a/include/boost/config/stdlib/modena.hpp +++ b/include/boost/config/stdlib/modena.hpp @@ -62,6 +62,7 @@ #endif // C++17 features +# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE #define BOOST_STDLIB "Modena C++ standard library" diff --git a/include/boost/config/stdlib/msl.hpp b/include/boost/config/stdlib/msl.hpp index ce60b7ee..c9e6b281 100644 --- a/include/boost/config/stdlib/msl.hpp +++ b/include/boost/config/stdlib/msl.hpp @@ -86,6 +86,7 @@ #endif // C++17 features +# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE #define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__) diff --git a/include/boost/config/stdlib/roguewave.hpp b/include/boost/config/stdlib/roguewave.hpp index e87ec78d..420fa26b 100644 --- a/include/boost/config/stdlib/roguewave.hpp +++ b/include/boost/config/stdlib/roguewave.hpp @@ -198,4 +198,5 @@ #endif // C++17 features +# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE diff --git a/include/boost/config/stdlib/sgi.hpp b/include/boost/config/stdlib/sgi.hpp index 1623de38..a1ef7343 100644 --- a/include/boost/config/stdlib/sgi.hpp +++ b/include/boost/config/stdlib/sgi.hpp @@ -156,6 +156,7 @@ #endif // C++17 features +# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE #define BOOST_STDLIB "SGI standard library" diff --git a/include/boost/config/stdlib/stlport.hpp b/include/boost/config/stdlib/stlport.hpp index 6d796128..971b7813 100644 --- a/include/boost/config/stdlib/stlport.hpp +++ b/include/boost/config/stdlib/stlport.hpp @@ -246,6 +246,7 @@ namespace boost { using std::min; using std::max; } #endif // C++17 features +# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT) diff --git a/include/boost/config/stdlib/vacpp.hpp b/include/boost/config/stdlib/vacpp.hpp index 0876cf8c..9d93ae4e 100644 --- a/include/boost/config/stdlib/vacpp.hpp +++ b/include/boost/config/stdlib/vacpp.hpp @@ -62,6 +62,7 @@ #endif // C++17 features +# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE #define BOOST_STDLIB "Visual Age default standard library" diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index d76b6cf3..c7b9a4f3 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 Oct 14 20:08:50 2016 +# This file was automatically generated on Sun Dec 11 12:22:04 2016 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -358,6 +358,9 @@ test-suite "BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION" : test-suite "BOOST_NO_CXX14_VARIABLE_TEMPLATES" : [ run ../no_cxx14_var_templ_pass.cpp ] [ compile-fail ../no_cxx14_var_templ_fail.cpp ] ; +test-suite "BOOST_NO_CXX17_STD_APPLY" : +[ run ../no_cxx17_std_apply_pass.cpp ] +[ compile-fail ../no_cxx17_std_apply_fail.cpp ] ; test-suite "BOOST_NO_CXX17_STD_INVOKE" : [ run ../no_cxx17_std_invoke_pass.cpp ] [ compile-fail ../no_cxx17_std_invoke_fail.cpp ] ; diff --git a/test/boost_no_cxx17_std_apply.ipp b/test/boost_no_cxx17_std_apply.ipp new file mode 100644 index 00000000..c657c039 --- /dev/null +++ b/test/boost_no_cxx17_std_apply.ipp @@ -0,0 +1,28 @@ +// (C) Copyright Oliver Kowalke 2016. +// 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_CXX17_STD_APPLY +// TITLE: apply +// DESCRIPTION: The compiler supports the std::apply() function. + +#include +#include + +namespace boost_no_cxx17_std_apply { + +int foo( int i, int j) { + return i + j; +} + +int test() { + int i = 1, j = 2; + std::apply( foo, std::make_tuple( i, j) ); + return 0; +} + +} + diff --git a/test/config_info.cpp b/test/config_info.cpp index 8bb1e441..0e67f71b 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -1074,6 +1074,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES); PRINT_MACRO(BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION); PRINT_MACRO(BOOST_NO_CXX14_VARIABLE_TEMPLATES); + PRINT_MACRO(BOOST_NO_CXX17_STD_APPLY); PRINT_MACRO(BOOST_NO_CXX17_STD_INVOKE); PRINT_MACRO(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS); PRINT_MACRO(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS); @@ -1145,6 +1146,7 @@ void print_boost_macros() + // END GENERATED BLOCK PRINT_MACRO(BOOST_INTEL); diff --git a/test/config_test.cpp b/test/config_test.cpp index a887972d..2e4c23e3 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Oct 14 20:08:50 2016 +// This file was automatically generated on Sun Dec 11 12:22:04 2016 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -317,6 +317,11 @@ namespace boost_no_cxx14_return_type_deduction = empty_boost; #else namespace boost_no_cxx14_variable_templates = empty_boost; #endif +#ifndef BOOST_NO_CXX17_STD_APPLY +#include "boost_no_cxx17_std_apply.ipp" +#else +namespace boost_no_cxx17_std_apply = empty_boost; +#endif #ifndef BOOST_NO_CXX17_STD_INVOKE #include "boost_no_cxx17_std_invoke.ipp" #else @@ -1566,6 +1571,11 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_CXX14_VARIABLE_TEMPLATES at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_no_cxx17_std_apply::test()) + { + std::cerr << "Failed test for BOOST_NO_CXX17_STD_APPLY at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_no_cxx17_std_invoke::test()) { std::cerr << "Failed test for BOOST_NO_CXX17_STD_INVOKE at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/test/no_cxx17_std_apply_fail.cpp b/test/no_cxx17_std_apply_fail.cpp new file mode 100644 index 00000000..e1c3d367 --- /dev/null +++ b/test/no_cxx17_std_apply_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Fri Oct 14 12:13:46 2016 +// 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_CXX17_STD_APPLY +// This file should not compile, if it does then +// BOOST_NO_CXX17_STD_APPLY should not be defined. +// See file boost_no_cxx17_std_apply.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_CXX17_STD_APPLY +#include "boost_no_cxx17_std_apply.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx17_std_apply::test(); +} + diff --git a/test/no_cxx17_std_apply_pass.cpp b/test/no_cxx17_std_apply_pass.cpp new file mode 100644 index 00000000..b3aa8744 --- /dev/null +++ b/test/no_cxx17_std_apply_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Fri Oct 14 12:13:46 2016 +// 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_CXX17_STD_APPLY +// This file should compile, if it does not then +// BOOST_NO_CXX!/_STD_APPLY should be defined. +// See file boost_no_cxx17_std_apply.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_CXX17_STD_APPLY +#include "boost_no_cxx17_std_apply.ipp" +#else +namespace boost_no_cxx17_std_apply = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx17_std_apply::test(); +} + From 6f0c359a4e2e5fcfad4cf9af9524b53122fdb494 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 11 Dec 2016 16:45:12 +0400 Subject: [PATCH 10/15] Disable C++14 constexpr for Intel compiler Intel compiler up to version 17.0 (on Linux) makes constexpr member functions implicitly const-qualified. --- include/boost/config/compiler/intel.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/boost/config/compiler/intel.hpp b/include/boost/config/compiler/intel.hpp index 80969e9e..fad1a5aa 100644 --- a/include/boost/config/compiler/intel.hpp +++ b/include/boost/config/compiler/intel.hpp @@ -496,6 +496,11 @@ template<> struct assert_intrinsic_wchar_t {}; # define BOOST_NO_CXX11_HDR_TUPLE #endif +// Broken in all versions up to 17: +#if !defined(BOOST_NO_CXX14_CONSTEXPR) +#define BOOST_NO_CXX14_CONSTEXPR +#endif + #if (BOOST_INTEL_CXX_VERSION < 1200) // // fenv.h appears not to work with Intel prior to 12.0: From 13f5d9c88ae5363fe547f04c1d272b2a772a8b4d Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Mon, 12 Dec 2016 19:41:30 +0100 Subject: [PATCH 11/15] defect macro for C++14 feature `std::exchange()` --- checks/Jamfile.v2 | 3 +- checks/test_case.cpp | 6 +++- include/boost/config/stdlib/dinkumware.hpp | 5 +++ include/boost/config/stdlib/libcomo.hpp | 3 ++ include/boost/config/stdlib/libcpp.hpp | 5 +++ include/boost/config/stdlib/libstdcpp3.hpp | 1 + include/boost/config/stdlib/modena.hpp | 3 ++ include/boost/config/stdlib/msl.hpp | 3 ++ include/boost/config/stdlib/roguewave.hpp | 3 ++ include/boost/config/stdlib/sgi.hpp | 3 ++ include/boost/config/stdlib/stlport.hpp | 3 ++ include/boost/config/stdlib/vacpp.hpp | 3 ++ test/all/Jamfile.v2 | 5 ++- test/boost_no_cxx14_std_exchange.ipp | 23 ++++++++++++++ test/config_info.cpp | 2 ++ test/config_test.cpp | 12 ++++++- test/no_cxx14_std_exchange_fail.cpp | 37 ++++++++++++++++++++++ test/no_cxx14_std_exchange_pass.cpp | 37 ++++++++++++++++++++++ 18 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 test/boost_no_cxx14_std_exchange.ipp create mode 100644 test/no_cxx14_std_exchange_fail.cpp create mode 100644 test/no_cxx14_std_exchange_pass.cpp diff --git a/checks/Jamfile.v2 b/checks/Jamfile.v2 index e39fa226..dcdcd7eb 100644 --- a/checks/Jamfile.v2 +++ b/checks/Jamfile.v2 @@ -1,6 +1,6 @@ # # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Sun Dec 11 12:22:05 2016 +# This file was automatically generated on Mon Dec 12 19:37:08 2016 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -130,6 +130,7 @@ run-simple TEST_BOOST_NO_CXX14_HDR_SHARED_MUTEX : cxx14_hdr_shared_mutex run-simple TEST_BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES : cxx14_initialized_lambda_captures ; run-simple TEST_BOOST_NO_CXX14_AGGREGATE_NSDMI : cxx14_aggregate_nsdmi ; run-simple TEST_BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION : cxx14_return_type_deduction ; +run-simple TEST_BOOST_NO_CXX14_STD_EXCHANGE : cxx14_std_exchange ; run-simple TEST_BOOST_NO_CXX14_VARIABLE_TEMPLATES : cxx14_variable_templates ; run-simple TEST_BOOST_NO_CXX17_STD_APPLY : cxx17_std_apply ; run-simple TEST_BOOST_NO_CXX17_STD_INVOKE : cxx17_std_invoke ; diff --git a/checks/test_case.cpp b/checks/test_case.cpp index caad5bbf..dbfaa653 100644 --- a/checks/test_case.cpp +++ b/checks/test_case.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Sun Dec 11 12:22:05 2016 +// This file was automatically generated on Mon Dec 12 19:37:08 2016 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -453,6 +453,10 @@ namespace test = boost_no_cxx14_aggregate_nsdmi; # include "../test/boost_no_cxx14_return_type_ded.ipp" namespace test = boost_no_cxx14_return_type_deduction; #endif +#ifdef TEST_BOOST_NO_CXX14_STD_EXCHANGE +# include "../test/boost_no_cxx14_std_exchange.ipp" +namespace test = boost_no_cxx14_std_exchange; +#endif #ifdef TEST_BOOST_NO_CXX14_VARIABLE_TEMPLATES # include "../test/boost_no_cxx14_var_templ.ipp" namespace test = boost_no_cxx14_variable_templates; diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index 6094bcc1..ad9e4f5d 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -157,6 +157,11 @@ # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif +// C++14 features +#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) +# define BOOST_NO_CXX14_STD_EXCHANGE +#endif + // C++17 features #if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) # define BOOST_NO_CXX17_STD_APPLY diff --git a/include/boost/config/stdlib/libcomo.hpp b/include/boost/config/stdlib/libcomo.hpp index a7be537c..e3fc627f 100644 --- a/include/boost/config/stdlib/libcomo.hpp +++ b/include/boost/config/stdlib/libcomo.hpp @@ -72,6 +72,9 @@ # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif +// C++14 features +# define BOOST_NO_CXX14_STD_EXCHANGE + // C++17 features # define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE diff --git a/include/boost/config/stdlib/libcpp.hpp b/include/boost/config/stdlib/libcpp.hpp index d5d2fd61..2eea9997 100644 --- a/include/boost/config/stdlib/libcpp.hpp +++ b/include/boost/config/stdlib/libcpp.hpp @@ -79,6 +79,11 @@ #define BOOST_NO_STD_MESSAGES #endif +// C++14 features +#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L) +# define BOOST_NO_CXX14_STD_EXCHANGE +#endif + // C++17 features #if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L) # define BOOST_NO_CXX17_STD_INVOKE diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index 1cbebb87..6e40bad4 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -239,6 +239,7 @@ // Although is present and compilable against, the actual implementation is not functional // even for the simplest patterns such as "\d" or "[0-9]". This is the case at least in gcc up to 4.8, inclusively. # define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX14_STD_EXCHANGE #endif #if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7))) diff --git a/include/boost/config/stdlib/modena.hpp b/include/boost/config/stdlib/modena.hpp index 27ca4531..fa4a8187 100644 --- a/include/boost/config/stdlib/modena.hpp +++ b/include/boost/config/stdlib/modena.hpp @@ -61,6 +61,9 @@ # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif +// C++14 features +# define BOOST_NO_CXX14_STD_EXCHANGE + // C++17 features # define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE diff --git a/include/boost/config/stdlib/msl.hpp b/include/boost/config/stdlib/msl.hpp index c9e6b281..8f21a138 100644 --- a/include/boost/config/stdlib/msl.hpp +++ b/include/boost/config/stdlib/msl.hpp @@ -85,6 +85,9 @@ # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif +// C++14 features +# define BOOST_NO_CXX14_STD_EXCHANGE + // C++17 features # define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE diff --git a/include/boost/config/stdlib/roguewave.hpp b/include/boost/config/stdlib/roguewave.hpp index 420fa26b..437d38d9 100644 --- a/include/boost/config/stdlib/roguewave.hpp +++ b/include/boost/config/stdlib/roguewave.hpp @@ -197,6 +197,9 @@ # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif +// C++14 features +# define BOOST_NO_CXX14_STD_EXCHANGE + // C++17 features # define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE diff --git a/include/boost/config/stdlib/sgi.hpp b/include/boost/config/stdlib/sgi.hpp index a1ef7343..8d2f849f 100644 --- a/include/boost/config/stdlib/sgi.hpp +++ b/include/boost/config/stdlib/sgi.hpp @@ -155,6 +155,9 @@ # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif +// C++14 features +# define BOOST_NO_CXX14_STD_EXCHANGE + // C++17 features # define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE diff --git a/include/boost/config/stdlib/stlport.hpp b/include/boost/config/stdlib/stlport.hpp index 971b7813..518f9efd 100644 --- a/include/boost/config/stdlib/stlport.hpp +++ b/include/boost/config/stdlib/stlport.hpp @@ -245,6 +245,9 @@ namespace boost { using std::min; using std::max; } # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif +// C++14 features +# define BOOST_NO_CXX14_STD_EXCHANGE + // C++17 features # define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE diff --git a/include/boost/config/stdlib/vacpp.hpp b/include/boost/config/stdlib/vacpp.hpp index 9d93ae4e..f9afef63 100644 --- a/include/boost/config/stdlib/vacpp.hpp +++ b/include/boost/config/stdlib/vacpp.hpp @@ -61,6 +61,9 @@ # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif +// C++14 features +# define BOOST_NO_CXX14_STD_EXCHANGE + // C++17 features # define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_INVOKE diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index c7b9a4f3..57605714 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 Sun Dec 11 12:22:04 2016 +# This file was automatically generated on Mon Dec 12 19:37:08 2016 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -355,6 +355,9 @@ test-suite "BOOST_NO_CXX14_AGGREGATE_NSDMI" : test-suite "BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION" : [ run ../no_cxx14_return_type_ded_pass.cpp ] [ compile-fail ../no_cxx14_return_type_ded_fail.cpp ] ; +test-suite "BOOST_NO_CXX14_STD_EXCHANGE" : +[ run ../no_cxx14_std_exchange_pass.cpp ] +[ compile-fail ../no_cxx14_std_exchange_fail.cpp ] ; test-suite "BOOST_NO_CXX14_VARIABLE_TEMPLATES" : [ run ../no_cxx14_var_templ_pass.cpp ] [ compile-fail ../no_cxx14_var_templ_fail.cpp ] ; diff --git a/test/boost_no_cxx14_std_exchange.ipp b/test/boost_no_cxx14_std_exchange.ipp new file mode 100644 index 00000000..111abd9c --- /dev/null +++ b/test/boost_no_cxx14_std_exchange.ipp @@ -0,0 +1,23 @@ +// (C) Copyright Oliver Kowalke 2016. +// 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_CXX14_STD_EXCHANGE +// TITLE: apply +// DESCRIPTION: The compiler supports the std::exchange() function. + +#include + +namespace boost_no_cxx14_std_exchange { + +int test() { + int * i = new int( 1); + int * j = std::exchange( i, nullptr); + delete j; + return 0; +} + +} diff --git a/test/config_info.cpp b/test/config_info.cpp index 0e67f71b..53251d28 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -1073,6 +1073,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_CXX14_HDR_SHARED_MUTEX); PRINT_MACRO(BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES); PRINT_MACRO(BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION); + PRINT_MACRO(BOOST_NO_CXX14_STD_EXCHANGE); PRINT_MACRO(BOOST_NO_CXX14_VARIABLE_TEMPLATES); PRINT_MACRO(BOOST_NO_CXX17_STD_APPLY); PRINT_MACRO(BOOST_NO_CXX17_STD_INVOKE); @@ -1147,6 +1148,7 @@ void print_boost_macros() + // END GENERATED BLOCK PRINT_MACRO(BOOST_INTEL); diff --git a/test/config_test.cpp b/test/config_test.cpp index 2e4c23e3..77f4511c 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Sun Dec 11 12:22:04 2016 +// This file was automatically generated on Mon Dec 12 19:37:08 2016 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -312,6 +312,11 @@ namespace boost_no_cxx14_aggregate_nsdmi = empty_boost; #else namespace boost_no_cxx14_return_type_deduction = empty_boost; #endif +#ifndef BOOST_NO_CXX14_STD_EXCHANGE +#include "boost_no_cxx14_std_exchange.ipp" +#else +namespace boost_no_cxx14_std_exchange = empty_boost; +#endif #ifndef BOOST_NO_CXX14_VARIABLE_TEMPLATES #include "boost_no_cxx14_var_templ.ipp" #else @@ -1566,6 +1571,11 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_no_cxx14_std_exchange::test()) + { + std::cerr << "Failed test for BOOST_NO_CXX14_STD_EXCHANGE at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_no_cxx14_variable_templates::test()) { std::cerr << "Failed test for BOOST_NO_CXX14_VARIABLE_TEMPLATES at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/test/no_cxx14_std_exchange_fail.cpp b/test/no_cxx14_std_exchange_fail.cpp new file mode 100644 index 00000000..c7100377 --- /dev/null +++ b/test/no_cxx14_std_exchange_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Fri Oct 14 12:13:46 2016 +// 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_CXX17_STD_APPLY +// This file should not compile, if it does then +// BOOST_NO_CXX17_STD_APPLY should not be defined. +// See file boost_no_cxx17_std_apply.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_CXX14_STD_EXCHANGE +#include "boost_no_cxx14_std_exchange.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx14_std_exchange::test(); +} + diff --git a/test/no_cxx14_std_exchange_pass.cpp b/test/no_cxx14_std_exchange_pass.cpp new file mode 100644 index 00000000..edac2fbf --- /dev/null +++ b/test/no_cxx14_std_exchange_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Fri Oct 14 12:13:46 2016 +// 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_CXX17_STD_APPLY +// This file should compile, if it does not then +// BOOST_NO_CXX!/_STD_APPLY should be defined. +// See file boost_no_cxx17_std_apply.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_CXX14_STD_EXCHANGE +#include "boost_no_cxx14_std_exchange.ipp" +#else +namespace boost_no_cxx14_std_exchange = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx14_std_exchange::test(); +} + From 553dcbec9600fce92aa94ca27e4e9c5b0f94b434 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 15 Dec 2016 10:21:26 +0000 Subject: [PATCH 12/15] MSVC has no std::apply. --- include/boost/config/stdlib/dinkumware.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index ad9e4f5d..f08f44f0 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -163,8 +163,8 @@ #endif // C++17 features -#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) # define BOOST_NO_CXX17_STD_APPLY +#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) # define BOOST_NO_CXX17_STD_INVOKE #endif From 25be5543ae395d16f23ed2ad80c6f9848eb9edef Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 15 Dec 2016 10:35:00 +0000 Subject: [PATCH 13/15] libstdc++ has no std::exchange unless in C++14 mode. --- include/boost/config/stdlib/libstdcpp3.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index 6e40bad4..557767b1 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -239,6 +239,8 @@ // Although is present and compilable against, the actual implementation is not functional // even for the simplest patterns such as "\d" or "[0-9]". This is the case at least in gcc up to 4.8, inclusively. # define BOOST_NO_CXX11_HDR_REGEX +#endif +#if (BOOST_LIBSTDCXX_VERSION < 40900) || (__cplusplus <= 201103) # define BOOST_NO_CXX14_STD_EXCHANGE #endif From 2fd39f10cbf1d3fa32278df43418ce9f42f1e7d4 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 15 Dec 2016 10:37:11 +0000 Subject: [PATCH 14/15] Intel appears not to support C++14 variable templates. --- include/boost/config/compiler/intel.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/boost/config/compiler/intel.hpp b/include/boost/config/compiler/intel.hpp index fad1a5aa..1885ea28 100644 --- a/include/boost/config/compiler/intel.hpp +++ b/include/boost/config/compiler/intel.hpp @@ -35,6 +35,10 @@ #endif +#if (__INTEL_COMPILER <= 1600) && !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + #else #include From 54f108a006b3218bfb49e2e6a5d8c673e449536f Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 15 Dec 2016 18:29:58 +0000 Subject: [PATCH 15/15] MSVC compatible compilers may have __has_include but still set __cplusplus to obsolete versions numbers for MSVC compatibility (ie Intel). --- include/boost/config/stdlib/dinkumware.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index f08f44f0..8cf5d4dd 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -150,7 +150,7 @@ #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 +#elif (__cplusplus < 201402) && !defined(_MSC_VER) # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #elif !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650)