From 947571e21451d35ee6a0e067c43e6d8320a2ed72 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Wed, 1 Jan 2020 13:10:17 -0500 Subject: [PATCH 1/2] Add BOOST_INLINE_CONSTEXPR convenience macro --- doc/macro_reference.qbk | 1 + include/boost/config/detail/suffix.hpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index 277b9d36..d8975729 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -978,6 +978,7 @@ provide compliant C++17 support. [table [[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.]] +[[`BOOST_INLINE_CONSTEXPR`][This is a shortcut for `BOOST_INLINE_VARIABLE BOOST_CONSTEXPR_OR_CONST`.]] ] [endsect] diff --git a/include/boost/config/detail/suffix.hpp b/include/boost/config/detail/suffix.hpp index 9131cba4..48069064 100644 --- a/include/boost/config/detail/suffix.hpp +++ b/include/boost/config/detail/suffix.hpp @@ -1003,6 +1003,8 @@ namespace std{ using ::type_info; } #define BOOST_INLINE_VARIABLE #endif +#define BOOST_INLINE_CONSTEXPR BOOST_INLINE_VARIABLE BOOST_CONSTEXPR_OR_CONST + // // Unused variable/typedef workarounds: // From 035c096da942a3fa7f75180ae8b2f2732db0a9f4 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 24 Jan 2020 18:19:31 +0000 Subject: [PATCH 2/2] Disable workaround when not required. --- include/boost/config/stdlib/dinkumware.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index 7d565653..10980420 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -86,6 +86,7 @@ # define BOOST_NO_STD_LOCALE #endif +#if BOOST_MSVC < 1800 // Fix for VC++ 8.0 on up ( I do not have a previous version to test ) // or clang-cl. If exceptions are off you must manually include the // header before including the header. Admittedly @@ -100,6 +101,7 @@ && !defined(__VXWORKS__) # define BOOST_NO_STD_TYPEINFO #endif +#endif // C++0x headers implemented in 520 (as shipped by Microsoft) //