From 01f9dbd1f4469f1b33bcaed903eaff2e5cd20f0c Mon Sep 17 00:00:00 2001 From: Denis Blank Date: Thu, 20 Jan 2022 07:54:45 +0100 Subject: [PATCH] Add support for stable coroutines (/await:strict and -fcoroutines) * The definition CONTINUABLE_HAS_COROUTINE now indicates support for coroutines, while CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE is added if the experimental version is used. --- CMakeLists.txt | 197 +++++++++--------- include/continuable/continuable-base.hpp | 9 +- include/continuable/continuable-coroutine.hpp | 10 +- include/continuable/detail/features.hpp | 62 ++++-- .../continuable/detail/other/coroutines.hpp | 33 ++- .../multi/test-continuable-await.cpp | 3 +- 6 files changed, 175 insertions(+), 139 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eedcc00..71b65af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,3 @@ - # Copyright(c) 2015 - 2020 Denis Blank # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -8,8 +7,8 @@ # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions : # -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -21,56 +20,59 @@ cmake_minimum_required(VERSION 3.11) -project(continuable VERSION 4.0.0 LANGUAGES C CXX) +project( + continuable + VERSION 4.0.0 + LANGUAGES C CXX) -if (CTI_CONTINUABLE_IS_FIND_INCLUDED) +if(CTI_CONTINUABLE_IS_FIND_INCLUDED) set(CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT OFF) else() string(COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} - CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) + CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) endif() -option(CTI_CONTINUABLE_WITH_INSTALL - "Add the continuable install targets" - ${CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT}) +if(CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) + message( + STATUS + "Building with ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER_VERSION})") +endif() -option(CTI_CONTINUABLE_WITH_TESTS - "Build the continuable unit tests" - ${CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT}) +option(CTI_CONTINUABLE_WITH_INSTALL "Add the continuable install targets" + ${CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT}) -option(CTI_CONTINUABLE_WITH_EXAMPLES - "Build the continuable examples" - ${CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT}) +option(CTI_CONTINUABLE_WITH_TESTS "Build the continuable unit tests" + ${CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT}) -option(CTI_CONTINUABLE_WITH_BENCHMARKS - "Build the continuable benchmarks" - OFF) +option(CTI_CONTINUABLE_WITH_EXAMPLES "Build the continuable examples" + ${CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT}) -option(CTI_CONTINUABLE_WITH_NO_EXCEPTIONS - "Disable exception support" - OFF) +option(CTI_CONTINUABLE_WITH_BENCHMARKS "Build the continuable benchmarks" OFF) + +option(CTI_CONTINUABLE_WITH_NO_EXCEPTIONS "Disable exception support" OFF) option(CTI_CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS - "Enable unhandled asynchronous exceptions" - OFF) + "Enable unhandled asynchronous exceptions" OFF) + +option(CTI_CONTINUABLE_WITH_COROUTINE "Enable C++20 coroutines" OFF) option(CTI_CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE - "Enable co_await support" - OFF) + "Enable experimental coroutines" OFF) option(CTI_CONTINUABLE_WITH_CPP_LATEST - "Enable the highest C++ standard available for testing polyfills" - OFF) + "Enable the highest C++ standard available for testing polyfills" OFF) option(CTI_CONTINUABLE_WITH_LIGHT_TESTS - "Disable some template heavy unit tests (for CI usage)" - OFF) + "Disable some template heavy unit tests (for CI usage)" OFF) # Top level project settings only -if (CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) +if(CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) set(CTI_CONTINUABLE_WITH_CONCURRENT_JOBS - "0" CACHE STRING - "Set the number of concurrent compilation jobs (0 = unlimited, for CI usage)") + "0" + CACHE + STRING + "Set the number of concurrent compilation jobs (0 = unlimited, for CI usage)" + ) else() set(CTI_CONTINUABLE_WITH_CONCURRENT_JOBS "0") endif() @@ -80,7 +82,7 @@ if(NOT TARGET Threads::Threads) find_package(Threads REQUIRED) endif() -if (CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) +if(CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) include(cmake/CMakeLists.txt) add_subdirectory(dep) else() @@ -90,7 +92,7 @@ else() endif() # continuable-base -if (CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) +if(CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) add_library(continuable-base INTERFACE) else() add_library(continuable-base INTERFACE IMPORTED GLOBAL) @@ -98,55 +100,56 @@ endif() add_library(continuable::continuable-base ALIAS continuable-base) -target_include_directories(continuable-base - INTERFACE - $ - $) +target_include_directories( + continuable-base + INTERFACE $ + $) -target_link_libraries(continuable-base - INTERFACE - Threads::Threads) +target_link_libraries(continuable-base INTERFACE Threads::Threads) -target_compile_features(continuable-base - INTERFACE - cxx_alias_templates - cxx_auto_type - cxx_constexpr - cxx_decltype - cxx_decltype_auto - cxx_final - cxx_lambdas - cxx_generic_lambdas - cxx_variadic_templates - cxx_defaulted_functions - cxx_nullptr - cxx_trailing_return_types - cxx_return_type_deduction) +target_compile_features( + continuable-base + INTERFACE cxx_alias_templates + cxx_auto_type + cxx_constexpr + cxx_decltype + cxx_decltype_auto + cxx_final + cxx_lambdas + cxx_generic_lambdas + cxx_variadic_templates + cxx_defaulted_functions + cxx_nullptr + cxx_trailing_return_types + cxx_return_type_deduction) -if (CTI_CONTINUABLE_WITH_CPP_LATEST) - target_compile_features(continuable-base - INTERFACE - cxx_std_17) +if(CTI_CONTINUABLE_WITH_CPP_LATEST) + target_compile_features(continuable-base INTERFACE cxx_std_20) endif() -if (CTI_CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE) - target_compile_options(continuable-base - INTERFACE - $<$:/await> - $<$:-fcoroutines-ts>) +if(CTI_CONTINUABLE_WITH_COROUTINE) + if(NOT CTI_CONTINUABLE_WITH_CPP_LATEST) + message(FATAL_ERROR "CTI_CONTINUABLE_WITH_COROUTINE requires " + "CTI_CONTINUABLE_WITH_CPP_LATEST!") + endif() + target_compile_options( + continuable-base + INTERFACE $<$:/await:strict> + $<$:-fcoroutines-ts> + $<$:-fcoroutines>) +elseif(CTI_CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE) + target_compile_options( + continuable-base INTERFACE $<$:/await> + $<$:-fcoroutines-ts>) +endif() + +if(CTI_CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS) target_compile_definitions(continuable-base - INTERFACE - CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE) + INTERFACE CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS) endif() -if (CTI_CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS) - target_compile_definitions(continuable-base - INTERFACE - CONTINUABLE_WITH_UNHANDLED_EXCEPTIONS) -endif() - -if (CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) +if(CTI_CONTINUABLE_IS_TOP_LEVEL_PROJECT) add_library(continuable INTERFACE) else() add_library(continuable INTERFACE IMPORTED GLOBAL) @@ -154,18 +157,15 @@ endif() add_library(continuable::continuable ALIAS continuable) -target_link_libraries(continuable - INTERFACE - continuable::continuable-base - function2::function2) +target_link_libraries(continuable INTERFACE continuable::continuable-base + function2::function2) -if (CTI_CONTINUABLE_WITH_INSTALL) +if(CTI_CONTINUABLE_WITH_INSTALL) include(ExternalProject) include(GNUInstallDirs) include(CMakePackageConfigHelpers) - # Create an install target: - # Headers and license files + # Create an install target: Headers and license files install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/continuable" DESTINATION "include") install(FILES "LICENSE.txt" DESTINATION .) @@ -180,7 +180,8 @@ if (CTI_CONTINUABLE_WITH_INSTALL) DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") # ConfigVersion.cmake - configure_package_config_file("cmake/config.cmake.in" + configure_package_config_file( + "cmake/config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" # PATH_VARS INCLUDE_INSTALL_DIR SYSCONFIG_INSTALL_DIR @@ -189,15 +190,19 @@ if (CTI_CONTINUABLE_WITH_INSTALL) DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") # Targets.cmake - export(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}-base - NAMESPACE ${PROJECT_NAME}:: - FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake") - install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}-base - EXPORT "${PROJECT_NAME}Targets" - INCLUDES DESTINATION "include") - install(EXPORT "${PROJECT_NAME}Targets" - NAMESPACE ${PROJECT_NAME}:: - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") + export( + TARGETS ${PROJECT_NAME} ${PROJECT_NAME}-base + NAMESPACE ${PROJECT_NAME}:: + FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake") + install( + TARGETS ${PROJECT_NAME} ${PROJECT_NAME}-base + EXPORT "${PROJECT_NAME}Targets" + INCLUDES + DESTINATION "include") + install( + EXPORT "${PROJECT_NAME}Targets" + NAMESPACE ${PROJECT_NAME}:: + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") # Setup CPack for bundling set(CPACK_GENERATOR "ZIP") @@ -209,8 +214,8 @@ if (CTI_CONTINUABLE_WITH_INSTALL) endif() # Testing and examples -if (CTI_CONTINUABLE_WITH_TESTS OR CTI_CONTINUABLE_WITH_EXAMPLES) - if (MSVC) +if(CTI_CONTINUABLE_WITH_TESTS OR CTI_CONTINUABLE_WITH_EXAMPLES) + if(MSVC) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) string(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") @@ -218,11 +223,11 @@ if (CTI_CONTINUABLE_WITH_TESTS OR CTI_CONTINUABLE_WITH_EXAMPLES) enable_testing() - if (CTI_CONTINUABLE_WITH_TESTS) + if(CTI_CONTINUABLE_WITH_TESTS) add_subdirectory(test) endif() - if (CTI_CONTINUABLE_WITH_EXAMPLES) + if(CTI_CONTINUABLE_WITH_EXAMPLES) add_subdirectory(examples) endif() -endif () +endif() diff --git a/include/continuable/continuable-base.hpp b/include/continuable/continuable-base.hpp index 6a7f906..c63bcf7 100644 --- a/include/continuable/continuable-base.hpp +++ b/include/continuable/continuable-base.hpp @@ -47,10 +47,9 @@ #include #include -#ifdef CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE -# include +#if defined(CONTINUABLE_HAS_COROUTINE) # include -#endif // CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE +#endif // defined(CONTINUABLE_HAS_COROUTINE) namespace cti { /// \defgroup Base Base @@ -715,7 +714,7 @@ public: } /// \cond false -#ifdef CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE +#if defined(CONTINUABLE_HAS_COROUTINE) /// \endcond /// Implements the operator for awaiting on continuables using `co_await`. /// @@ -781,7 +780,7 @@ public: return detail::awaiting::create_awaiter(std::move(*this).finish()); } /// \cond false -#endif // CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE +#endif // defined(CONTINUABLE_HAS_COROUTINE) /// \endcond private: diff --git a/include/continuable/continuable-coroutine.hpp b/include/continuable/continuable-coroutine.hpp index 399d970..393476d 100644 --- a/include/continuable/continuable-coroutine.hpp +++ b/include/continuable/continuable-coroutine.hpp @@ -39,11 +39,9 @@ # include #endif // CONTINUABLE_HAS_EXCEPTIONS -#ifdef CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE +#if defined(CONTINUABLE_HAS_COROUTINE) # include -#endif // CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE -#if defined(CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE) namespace cti { # if defined(CONTINUABLE_HAS_EXCEPTIONS) /// Is thrown from co_await expressions if the awaited continuable is canceled @@ -78,7 +76,9 @@ using await_canceled_exception = detail::awaiting::await_canceled_exception; // As far as I know there is no other way to implement this specialization... // NOLINTNEXTLINE(cert-dcl58-cpp) namespace std { +# if defined(CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE) namespace experimental { +# endif // defined(CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE) template struct coroutine_traits< cti::continuable_base>, @@ -87,9 +87,11 @@ struct coroutine_traits< using promise_type = cti::detail::awaiting::promise_type< cti::continuable, cti::promise, Args...>; }; +# if defined(CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE) } // namespace experimental +# endif // defined(CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE) } // namespace std /// \endcond -#endif // CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE +#endif // defined(CONTINUABLE_HAS_COROUTINE) #endif // CONTINUABLE_COROUTINE_HPP_INCLUDED diff --git a/include/continuable/detail/features.hpp b/include/continuable/detail/features.hpp index 23c29c5..1e81457 100644 --- a/include/continuable/detail/features.hpp +++ b/include/continuable/detail/features.hpp @@ -33,19 +33,19 @@ // Defines CONTINUABLE_WITH_NO_EXCEPTIONS when exception support is disabled #ifndef CONTINUABLE_WITH_NO_EXCEPTIONS -#if defined(_MSC_VER) -#if !defined(_HAS_EXCEPTIONS) || (_HAS_EXCEPTIONS == 0) -#define CONTINUABLE_WITH_NO_EXCEPTIONS -#endif -#elif defined(__clang__) -#if !(__EXCEPTIONS && __has_feature(cxx_exceptions)) -#define CONTINUABLE_WITH_NO_EXCEPTIONS -#endif -#elif defined(__GNUC__) -#if !__EXCEPTIONS -#define CONTINUABLE_WITH_NO_EXCEPTIONS -#endif -#endif +# if defined(_MSC_VER) +# if !defined(_HAS_EXCEPTIONS) || (_HAS_EXCEPTIONS == 0) +# define CONTINUABLE_WITH_NO_EXCEPTIONS +# endif +# elif defined(__clang__) +# if !(__EXCEPTIONS && __has_feature(cxx_exceptions)) +# define CONTINUABLE_WITH_NO_EXCEPTIONS +# endif +# elif defined(__GNUC__) +# if !__EXCEPTIONS +# define CONTINUABLE_WITH_NO_EXCEPTIONS +# endif +# endif #endif // CONTINUABLE_WITH_NO_EXCEPTIONS // clang-format off @@ -86,24 +86,40 @@ #endif #endif -/// Usually this is enabled by the CMake project -#if !defined(CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE) +// Automatically detects support for coroutines. +// Parts of this detection mechanism were adapted from boost::asio, +// with support added for experimental coroutines. +#if !defined(CONTINUABLE_HAS_DISABLED_COROUTINE) \ + && !defined(CONTINUABLE_HAS_COROUTINE) /// Define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE when /// CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE is defined. #if defined(CONTINUABLE_WITH_EXPERIMENTAL_COROUTINE) - #define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE - #elif defined(_MSC_VER) - #if _MSC_FULL_VER >= 190023506 + #define CONTINUABLE_HAS_COROUTINE 1 + #elif defined(CONTINUABLE_WITH_COROUTINE) + #define CONTINUABLE_HAS_COROUTINE 1 + #define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE 1 + #elif defined(_MSC_VER) // Visual Studio + #if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) + #define CONTINUABLE_HAS_COROUTINE 1 + #elif _MSC_FULL_VER >= 190023506 #if defined(_RESUMABLE_FUNCTIONS_SUPPORTED) - #define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE + #define CONTINUABLE_HAS_COROUTINE 1 + #define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE 1 #endif // defined(_RESUMABLE_FUNCTIONS_SUPPORTED) #endif // _MSC_FULL_VER >= 190023506 - #elif defined(__clang__) + #elif defined(__clang__) // Clang #if defined(__cpp_coroutines) && (__cpp_coroutines >= 201707) - #define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE + #define CONTINUABLE_HAS_COROUTINE 1 + #define CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE 1 #endif // defined(__cpp_coroutines) && (__cpp_coroutines >= 201707) - #endif // defined(__clang__) -#endif // !defined(CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE) + #elif defined(__GNUC__) // GCC + #if (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902) + #if __has_include() + #define CONTINUABLE_HAS_COROUTINE 1 + #endif // __has_include() + #endif // (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902) + #endif +#endif /// Define CONTINUABLE_HAS_EXCEPTIONS when exceptions are used #if !defined(CONTINUABLE_WITH_CUSTOM_ERROR_TYPE) && \ diff --git a/include/continuable/detail/other/coroutines.hpp b/include/continuable/detail/other/coroutines.hpp index 9eb78f6..edf1551 100644 --- a/include/continuable/detail/other/coroutines.hpp +++ b/include/continuable/detail/other/coroutines.hpp @@ -34,7 +34,6 @@ #include #include -#include #include #include #include @@ -48,13 +47,26 @@ # include #endif // CONTINUABLE_HAS_EXCEPTIONS +#if defined(CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE) +# include +#elif defined(CONTINUABLE_HAS_COROUTINE) +# include +#endif + +#if defined(CONTINUABLE_HAS_COROUTINE) namespace cti { namespace detail { namespace awaiting { /// We import the coroutine handle in our namespace +# if defined(CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE) using std::experimental::coroutine_handle; +using std::experimental::suspend_never; +# else +using std::coroutine_handle; +using std::suspend_never; +# endif -#if defined(CONTINUABLE_HAS_EXCEPTIONS) +# if defined(CONTINUABLE_HAS_EXCEPTIONS) class await_canceled_exception : public std::exception { public: await_canceled_exception() noexcept = default; @@ -63,7 +75,7 @@ public: return "co_await canceled due to cancellation of the continuation"; } }; -#endif // CONTINUABLE_HAS_EXCEPTIONS +# endif // CONTINUABLE_HAS_EXCEPTIONS template struct result_from_identity; @@ -126,16 +138,16 @@ public: assert(result_.is_exception()); -#if defined(CONTINUABLE_HAS_EXCEPTIONS) +# if defined(CONTINUABLE_HAS_EXCEPTIONS) if (exception_t e = result_.get_exception()) { std::rethrow_exception(std::move(e)); } else { throw await_canceled_exception(); } -#else // CONTINUABLE_HAS_EXCEPTIONS +# else // CONTINUABLE_HAS_EXCEPTIONS // Returning error types from co_await isn't supported! CTI_DETAIL_TRAP(); -#endif // CONTINUABLE_HAS_EXCEPTIONS +# endif // CONTINUABLE_HAS_EXCEPTIONS } }; @@ -213,12 +225,12 @@ struct promise_type return {handle_}; } - std::experimental::suspend_never final_suspend() { + suspend_never final_suspend() noexcept { return {}; } void unhandled_exception() noexcept { -#if defined(CONTINUABLE_HAS_EXCEPTIONS) +# if defined(CONTINUABLE_HAS_EXCEPTIONS) try { std::rethrow_exception(std::current_exception()); } catch (await_canceled_exception const&) { @@ -226,14 +238,15 @@ struct promise_type } catch (...) { promise_.set_exception(std::current_exception()); } -#else // CONTINUABLE_HAS_EXCEPTIONS +# else // CONTINUABLE_HAS_EXCEPTIONS // Returning exception types from a coroutine isn't supported CTI_DETAIL_TRAP(); -#endif // CONTINUABLE_HAS_EXCEPTIONS +# endif // CONTINUABLE_HAS_EXCEPTIONS } }; } // namespace awaiting } // namespace detail } // namespace cti +#endif // defined(CONTINUABLE_HAS_COROUTINE) #endif // CONTINUABLE_DETAIL_UTIL_HPP_INCLUDED diff --git a/test/unit-test/multi/test-continuable-await.cpp b/test/unit-test/multi/test-continuable-await.cpp index 96df1d9..ee5370e 100644 --- a/test/unit-test/multi/test-continuable-await.cpp +++ b/test/unit-test/multi/test-continuable-await.cpp @@ -24,7 +24,8 @@ #include #include -#ifdef CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE + +#ifdef CONTINUABLE_HAS_COROUTINE # ifndef CONTINUABLE_WITH_NO_EXCEPTIONS # include