mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 16:56:44 +08:00
Improved the coroutine support auto detection on MSVC
* Based on _RESUMABLE_FUNCTIONS_SUPPORTED inspired from asio.
This commit is contained in:
parent
67d77808dc
commit
e9be3eb8c3
@ -87,17 +87,23 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// Usually this is enabled by the CMake project
|
/// Usually this is enabled by the CMake project
|
||||||
#if !defined(CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE) && \
|
#if !defined(CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE)
|
||||||
defined(__cpp_coroutines) && (__cpp_coroutines >= 201707)
|
/// Define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE when
|
||||||
|
/// CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE is defined.
|
||||||
|
#if defined(CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE)
|
||||||
#define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE
|
#define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE
|
||||||
#endif
|
#elif defined(_MSC_VER)
|
||||||
|
#if _MSC_FULL_VER >= 190023506
|
||||||
/// Define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE when
|
#if defined(_RESUMABLE_FUNCTIONS_SUPPORTED)
|
||||||
/// CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE is defined.
|
|
||||||
#if !defined(CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE) && \
|
|
||||||
defined(CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE)
|
|
||||||
#define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE
|
#define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE
|
||||||
#endif
|
#endif // defined(_RESUMABLE_FUNCTIONS_SUPPORTED)
|
||||||
|
#endif // _MSC_FULL_VER >= 190023506
|
||||||
|
#elif defined(__clang__)
|
||||||
|
#if defined(__cpp_coroutines) && (__cpp_coroutines >= 201707)
|
||||||
|
#define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE
|
||||||
|
#endif // defined(__cpp_coroutines) && (__cpp_coroutines >= 201707)
|
||||||
|
#endif // defined(__clang__)
|
||||||
|
#endif // !defined(CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE)
|
||||||
|
|
||||||
/// Define CONTINUABLE_HAS_EXCEPTIONS when exceptions are used
|
/// Define CONTINUABLE_HAS_EXCEPTIONS when exceptions are used
|
||||||
#if !defined(CONTINUABLE_WITH_CUSTOM_ERROR_TYPE) && \
|
#if !defined(CONTINUABLE_WITH_CUSTOM_ERROR_TYPE) && \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user