From cefbd3014ab1b0c305c4e58f650757fa4fa81040 Mon Sep 17 00:00:00 2001 From: Zach Laine Date: Sun, 10 Nov 2024 12:43:48 -0600 Subject: [PATCH] When defining BOOST_STL_INTERFACES_USE_DEDUCED_THIS=1, require C++23 mode for the cases where __cpp_explicit_this_parameter is not defined, but the compiler is known to support it. Obviously, even if those compiler support it, it's not available in older C++ versions. Fixes #72. Related to https://github.com/boostorg/stl_interfaces/pull/68 --- include/boost/stl_interfaces/config.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/boost/stl_interfaces/config.hpp b/include/boost/stl_interfaces/config.hpp index ec93a16..8788a98 100644 --- a/include/boost/stl_interfaces/config.hpp +++ b/include/boost/stl_interfaces/config.hpp @@ -20,10 +20,11 @@ #define BOOST_STL_INTERFACES_USE_CONCEPTS 0 #endif -#if (defined(__cpp_explicit_this_parameter) || \ - (defined(_MSC_VER) && _MSC_VER >= 1941) || \ - (defined(BOOST_CLANG_VERSION) && BOOST_CLANG_VERSION >= 190000)) && \ - BOOST_STL_INTERFACES_USE_CONCEPTS && \ +#if ( \ + defined(__cpp_explicit_this_parameter) || \ + (defined(_MSC_VER) && _MSC_VER >= 1941) || \ + (defined(BOOST_CLANG_VERSION) && BOOST_CLANG_VERSION >= 190000)) && \ + BOOST_STL_INTERFACES_USE_CONCEPTS && (202002L < __cplusplus) && \ !defined(BOOST_STL_INTERFACES_DISABLE_DEDUCED_THIS) #define BOOST_STL_INTERFACES_USE_DEDUCED_THIS 1 #else