From c4777c309e70019082c0ba546ab84b9852f83f7c Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 24 Jan 2023 18:54:45 +0200 Subject: [PATCH] Avoid including in core/launder.hpp when not C++17 --- include/boost/core/launder.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ) {