From 8aa8d541b370ee50119d6c5a8dc44113cd22b229 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 30 Oct 2019 18:30:31 +0000 Subject: [PATCH] Update suffix.hpp for older msvc versions. See https://github.com/boostorg/config/commit/8dcea4d78c7a9bd07322015d541fb76c77e33022#commitcomment-35718928. --- .../boost_config/boost_macro_reference.html | 68 ++++++++++++++++++- include/boost/config/detail/suffix.hpp | 4 +- test/Jamfile.v2 | 6 +- 3 files changed, 71 insertions(+), 7 deletions(-) diff --git a/doc/html/boost_config/boost_macro_reference.html b/doc/html/boost_config/boost_macro_reference.html index 8e0414f9..6c0cf00d 100644 --- a/doc/html/boost_config/boost_macro_reference.html +++ b/doc/html/boost_config/boost_macro_reference.html @@ -43,6 +43,8 @@ that allow use of C++14 features with C++11 or earlier compilers
Macros that describe C++17 features not supported
+
Macros + that allow use of C++17 features with C++14 or earlier compilers
Macros that describe features that have been removed from the standard.
Boost @@ -3557,6 +3559,20 @@ + +

+ BOOST_FINAL +

+ + +

+ If BOOST_NO_CXX11_FINAL + is not defined (i.e. C++11 compliant compilers), expands to final keyword, otherwise expands + to nothing. +

+ + +

BOOST_MSVC_ENABLE_2012_NOV_CTP @@ -3798,8 +3814,10 @@

- This macro works similar to BOOST_CONSTEXPR, but expands to constexpr only if the C++14 "relaxed" - constexpr is available. + This macro works similar to BOOST_CONSTEXPR, + but expands to constexpr + only if the C++14 "relaxed" constexpr + is available.

@@ -3925,7 +3943,8 @@

- The compiler does not support C++17 inline variables. + The compiler does not support inline + variables.

@@ -3934,6 +3953,49 @@
+

+ The following macros allow use of C++17 features even with compilers that + do not yet provide compliant C++17 support. +

+
++++ + + + + + + + + +
+

+ Macro +

+
+

+ Description +

+
+

+ BOOST_INLINE_VARIABLE +

+
+

+ This macro expands to inline + on compilers that support C++17 inline variables and to nothing + otherwise. Users may need to check for BOOST_NO_CXX17_INLINE_VARIABLES + for further adjustments to the code. +

+
+
+
+ diff --git a/include/boost/config/detail/suffix.hpp b/include/boost/config/detail/suffix.hpp index 6daf8335..47e139b4 100644 --- a/include/boost/config/detail/suffix.hpp +++ b/include/boost/config/detail/suffix.hpp @@ -1059,7 +1059,8 @@ namespace std{ using ::type_info; } #endif // This is a catch all case for obsolete compilers / std libs: -#if (!defined(__has_include) || (__cplusplus < 201700)) && !defined(_MSC_VER) +#if !defined(_YVALS) && !defined(_CPPLIB_VER) // msvc std lib already configured +#if (!defined(__has_include) || (__cplusplus < 201700)) # define BOOST_NO_CXX17_HDR_OPTIONAL # define BOOST_NO_CXX17_HDR_STRING_VIEW # define BOOST_NO_CXX17_HDR_VARIANT @@ -1074,6 +1075,7 @@ namespace std{ using ::type_info; } # define BOOST_NO_CXX17_HDR_VARIANT #endif #endif +#endif // // Finish off with checks for macros that are depricated / no longer supported, diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index cfc42ade..5b2a9ad9 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -77,9 +77,9 @@ test-suite config [ check-target-builds has_rt_lib : rt ] : 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 single msvc:static msvc:static msvc:on gcc:on clang:on ] + [ run config_info.cpp : : : always_show_run_output multi msvc:on gcc:on clang:on : config_info_threaded ] + [ run config_info.cpp : : : always_show_run_output off msvc:on gcc:on clang:on : config_info_no_rtti ] [ run config_info.cpp : : : always_show_run_output off vxworks:no : config_info_no_except ]