From d3d7aa618289930e7216e6b985edffe227c97be9 Mon Sep 17 00:00:00 2001 From: ramblehead Date: Sat, 20 Aug 2022 01:11:27 +0100 Subject: [PATCH] Adding clang-14 coroutines support --- include/boost/asio/detail/config.hpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/include/boost/asio/detail/config.hpp b/include/boost/asio/detail/config.hpp index bed969aaa0..2cfffb9fb0 100644 --- a/include/boost/asio/detail/config.hpp +++ b/include/boost/asio/detail/config.hpp @@ -2054,7 +2054,11 @@ # endif // defined(_RESUMABLE_FUNCTIONS_SUPPORTED) # endif // (_MSC_FULL_VER >= 190023506) # elif defined(__clang__) -# if (__cplusplus >= 201703) && (__cpp_coroutines >= 201703) +# if (__cplusplus >= 202002) && (__cpp_coroutines >= 201703) +# if __has_include() +# define BOOST_ASIO_HAS_CO_AWAIT 1 +# endif // __has_include() +# elif (__cplusplus >= 201703) && (__cpp_coroutines >= 201703) # if __has_include() # define BOOST_ASIO_HAS_CO_AWAIT 1 # endif // __has_include() @@ -2076,8 +2080,13 @@ # if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) # define BOOST_ASIO_HAS_STD_COROUTINE 1 # endif // (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) -# endif // defined(BOOST_ASIO_MSVC) -# if defined(__GNUC__) +# elif defined(__clang__) +# if (__cplusplus >= 202002) && (__cpp_coroutines >= 201703) +# if __has_include() +# define BOOST_ASIO_HAS_STD_COROUTINE 1 +# endif // __has_include() +# endif // (__cplusplus >= 202002) && (__cpp_coroutines >= 201703) +# elif defined(__GNUC__) # if (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902) # if __has_include() # define BOOST_ASIO_HAS_STD_COROUTINE 1