diff --git a/stl/inc/coroutine b/stl/inc/coroutine index 2c939373da9..c041e17463b 100644 --- a/stl/inc/coroutine +++ b/stl/inc/coroutine @@ -126,7 +126,11 @@ _NODISCARD constexpr bool operator==(const coroutine_handle<> _Left, const corou _NODISCARD constexpr strong_ordering operator<=>( const coroutine_handle<> _Left, const coroutine_handle<> _Right) noexcept { - return compare_three_way()(_Left.address(), _Right.address()); +#ifdef __cpp_lib_concepts + return compare_three_way{}(_Left.address(), _Right.address()); +#else // ^^^ no workaround / workaround vvv + return _Left.address() <=> _Right.address(); +#endif // __cpp_lib_concepts } template diff --git a/stl/inc/experimental/generator b/stl/inc/experimental/generator index 60e2a896de7..e19a80142d3 100644 --- a/stl/inc/experimental/generator +++ b/stl/inc/experimental/generator @@ -9,19 +9,19 @@ #include #if _STL_COMPILER_PREPROCESSOR -#if !defined(__cpp_coroutines) && !defined(__cpp_impl_coroutine) -#error requires /std:c++latest or /await compiler options -#endif // !defined(__cpp_coroutines) && !defined(__cpp_impl_coroutine) - #ifdef _CPPUNWIND #include #endif #include -#ifdef __cpp_coroutines -#include -#else // __cpp_coroutines + +#if defined(__cpp_impl_coroutine) #include -#endif // __cpp_coroutines +#elif defined(__cpp_coroutines) +#include +#else // ^^^ legacy coroutines / no coroutine support vvv +#error requires /std:c++latest or /await compiler options +#endif // ^^^ no coroutine support ^^^ + #pragma pack(push, _CRT_PACKING) #pragma warning(push, _STL_WARNING_LEVEL) diff --git a/tests/std/tests/VSO_0971246_legacy_await_headers/env.lst b/tests/std/tests/VSO_0971246_legacy_await_headers/env.lst index e162f31bdd7..ad91bfa4754 100644 --- a/tests/std/tests/VSO_0971246_legacy_await_headers/env.lst +++ b/tests/std/tests/VSO_0971246_legacy_await_headers/env.lst @@ -7,5 +7,4 @@ PM_CL="/EHsc /MT /std:c++latest /permissive-" PM_CL="/EHsc /MT /std:c++latest /permissive" PM_CL="/EHsc /MT /std:c++latest /permissive- /await" PM_CL="/EHsc /MT /std:c++latest /permissive /await" -PM_CL="/BE /c /EHsc /MD /std:c++latest /permissive- /await" PM_CL="/BE /c /EHsc /MD /std:c++latest /permissive-"