From cbc2f847090d866aa4a482b714e6d2fb4633d0d1 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Mon, 6 Jun 2022 14:09:07 +0300 Subject: [PATCH] Enabled C++17 CTAD guides for MSVC 14.14 (VS2017 Update 7) and later. MSVC doesn't define the standard feature detection macros, so we have to resort to compiler version checks. --- include/boost/config/detail/suffix.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/config/detail/suffix.hpp b/include/boost/config/detail/suffix.hpp index 318ffa9c..13d4bb6a 100644 --- a/include/boost/config/detail/suffix.hpp +++ b/include/boost/config/detail/suffix.hpp @@ -1219,7 +1219,11 @@ namespace std{ using ::type_info; } # define BOOST_NO_CXX20_HDR_VERSION #endif -#if !defined(__cpp_deduction_guides) || (__cpp_deduction_guides < 201606) +#if defined(BOOST_MSVC) +#if (BOOST_MSVC < 1914) || (_MSVC_LANG < 201703) +# define BOOST_NO_CXX17_DEDUCTION_GUIDES +#endif +#elif !defined(__cpp_deduction_guides) || (__cpp_deduction_guides < 201606) # define BOOST_NO_CXX17_DEDUCTION_GUIDES #endif