From 32b9ff620404cbda7567c7d2d37c11b59bc513a2 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Wed, 7 Dec 2022 07:35:50 +1100 Subject: [PATCH] Fix detection of return type deduction with MSVC. --- include/boost/asio/detail/config.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/asio/detail/config.hpp b/include/boost/asio/detail/config.hpp index 57cb39ce..28459e93 100644 --- a/include/boost/asio/detail/config.hpp +++ b/include/boost/asio/detail/config.hpp @@ -418,7 +418,11 @@ # if (__cpp_return_type_deduction >= 201304) # define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1 # endif // (__cpp_return_type_deduction >= 201304) -# endif // defined(__cpp_return_type_deduction) +# elif defined(BOOST_ASIO_MSVC) +# if (_MSC_VER >= 1900 && _MSVC_LANG >= 201402) +# define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1 +# endif // (_MSC_VER >= 1900 && _MSVC_LANG >= 201402) +# endif // defined(BOOST_ASIO_MSVC) # endif // !defined(BOOST_ASIO_DISABLE_RETURN_TYPE_DEDUCTION) #endif // !defined(BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION)