diff --git a/include/boost/core/launder.hpp b/include/boost/core/launder.hpp index d32d5a0..850338e 100644 --- a/include/boost/core/launder.hpp +++ b/include/boost/core/launder.hpp @@ -17,7 +17,7 @@ # endif #endif -#if !defined(BOOST_CORE_HAS_BUILTIN_LAUNDER) +#if (__cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)) && !defined(BOOST_CORE_HAS_BUILTIN_LAUNDER) # include #endif @@ -33,7 +33,7 @@ template T* launder( T* p ) return __builtin_launder( p ); } -#elif defined(__cpp_lib_launder) +#elif (__cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)) && defined(__cpp_lib_launder) template T* launder( T* p ) {