asio
asio copied to clipboard
asio config does not detect coroutine support with clang-cl as compiler
When compiling ASIO via clang-cl version 15.0 on Windows, the ASIO config sets ASIO_HAS_CO_AWAIT
to zero, even if clang actually has it.
The reason is in line 2024: if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) && !defined(__clang__)
My proposed solution is to use the <version>
header. And check for #if defined(__cpp_lib_coroutine) && __cpp_lib_coroutine == 201902L
It works if you use libc++ by setting -stdlib=libc++
.
It works if you use libc++ by setting
-stdlib=libc++
.
Thank you, but not every one can change the STL :/. This might work in some cases for clangd users. But not for the hole project itself, for example.