From 981cde6cf71316c1ad61d614d350a9d80e3a756a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Thu, 30 Sep 2021 22:43:06 +0200 Subject: [PATCH] Enable ASIO_HAS_STD_INVOKE_RESULT with libc++13 In c++20 mode std::result_of has been retired as per the standard, causing compile errors. --- asio/include/asio/detail/config.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/asio/include/asio/detail/config.hpp b/asio/include/asio/detail/config.hpp index 78fa8540ee..48691a495e 100644 --- a/asio/include/asio/detail/config.hpp +++ b/asio/include/asio/detail/config.hpp @@ -1213,6 +1213,13 @@ # define ASIO_HAS_STD_INVOKE_RESULT 1 # endif // (_MSC_VER >= 1911 && _MSVC_LANG >= 201703) # endif // defined(ASIO_MSVC) +# if defined(ASIO_HAS_CLANG_LIBCXX) +# if (_LIBCPP_VERSION >= 13000) +# if (__cplusplus >= 202002) +# define ASIO_HAS_STD_INVOKE_RESULT 1 +# endif // (__cplusplus >= 202002) +# endif // (_LIBCPP_VERSION >= 13000) +# endif // defined(ASIO_HAS_CLANG_LIBCXX) # endif // !defined(ASIO_DISABLE_STD_INVOKE_RESULT) #endif // !defined(ASIO_HAS_STD_INVOKE_RESULT)