We've arranged for the <coroutine> header and its test coverage to activate when a compiler defines __cpp_impl_coroutine to 201902L (the C++20 value). This is expected for MSVC in VS 2019 16.8 Preview 4 and we've verified that the test will pass at that time.
Currently, this is inactive for Clang and EDG. In theory, we should be able to take no action whatsoever, and this will automatically work in the future - but we should probably coordinate with their compiler devs to verify that everything will work with no library changes needed.
|
#ifdef __cpp_impl_coroutine // TRANSITION, Clang and EDG coroutine support |
|
#if __cpp_impl_coroutine >= 201902L |
|
#define __cpp_lib_coroutine 201902L |
|
#else // ^^^ __cpp_impl_coroutine >= 201902L ^^^ / vvv __cpp_impl_coroutine < 201902L vvv |
|
#define __cpp_lib_coroutine 197000L // TRANSITION, VS 2019 16.8 Preview 4 |
|
#endif // ^^^ __cpp_impl_coroutine < 201902L ^^^ |
|
#endif // __cpp_impl_coroutine |
|
#ifndef __cpp_lib_coroutine
|
|
#pragma message("The contents of <coroutine> are available only with C++20 or later.")
|
|
#else // ^^^ __cpp_lib_coroutine not defined / __cpp_lib_coroutine defined vvv
|
|
#include <version> // TRANSITION, P0912R5 Library Support For Coroutines |
|
#if defined(__cpp_lib_coroutine) && __cpp_lib_coroutine >= 201902L // TRANSITION, P0912R5 Library Support For Coroutines |
We've arranged for the
<coroutine>header and its test coverage to activate when a compiler defines__cpp_impl_coroutineto201902L(the C++20 value). This is expected for MSVC in VS 2019 16.8 Preview 4 and we've verified that the test will pass at that time.Currently, this is inactive for Clang and EDG. In theory, we should be able to take no action whatsoever, and this will automatically work in the future - but we should probably coordinate with their compiler devs to verify that everything will work with no library changes needed.
STL/stl/inc/yvals_core.h
Lines 1171 to 1177 in 484fbc9
STL/stl/inc/coroutine
Lines 16 to 18 in 484fbc9
STL/tests/std/tests/P0912R5_coroutine/test.cpp
Lines 4 to 5 in 484fbc9