From d719bee32a651937f0e456efc4966e3954cfd532 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 3 Feb 2022 12:55:34 +0000 Subject: [PATCH] Correct Dinkumware header detection to account for clang-cl. Fixes https://github.com/boostorg/config/issues/417. --- include/boost/config/stdlib/dinkumware.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index a9d3706c..a98aaf79 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -176,7 +176,9 @@ #endif // C++17 features -#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(BOOST_MSVC) || (BOOST_MSVC < 1910) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0) +#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) \ + || ((!defined(BOOST_MSVC) || (BOOST_MSVC < 1910))) && (!defined(__clang__) || !defined(_MSC_VER) || (_MSC_VER < 1929))\ + || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0) # define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_ITERATOR_TRAITS # define BOOST_NO_CXX17_HDR_STRING_VIEW @@ -213,6 +215,12 @@ # define BOOST_NO_CXX20_HDR_SOURCE_LOCATION # define BOOST_NO_CXX20_HDR_SYNCSTREAM #endif +#if !defined(BOOST_NO_CXX20_HDR_COROUTINE) && !defined(__cpp_lib_coroutine) +# define BOOST_NO_CXX20_HDR_COROUTINE +#endif +#if !defined(BOOST_NO_CXX20_HDR_SOURCE_LOCATION) && !defined(__cpp_consteval) +# define BOOST_NO_CXX20_HDR_SOURCE_LOCATION +#endif // Incomplete: # define BOOST_NO_CXX20_HDR_RANGES