Avoid including <new> in core/launder.hpp when not C++17

This commit is contained in:
Peter Dimov 2023-01-24 18:54:45 +02:00
parent 2b3b97c633
commit c4777c309e

View File

@ -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 <new>
#endif
@ -33,7 +33,7 @@ template<class T> 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<class T> T* launder( T* p )
{