Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update __cpp_lib_coroutine #1204

Merged
merged 1 commit into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@
// (partially implemented)
// P0898R3 Standard Library Concepts
// P0912R5 Library Support For Coroutines
// (partially implemented, missing noop coroutines)
// P0919R3 Heterogeneous Lookup For Unordered Containers
// P0966R1 string::reserve() Should Not Shrink
// P1001R2 execution::unseq
Expand Down Expand Up @@ -1169,8 +1168,12 @@
#define __cpp_lib_constexpr_tuple 201811L
#define __cpp_lib_constexpr_utility 201811L

#ifdef __cpp_impl_coroutine // TRANSITION, VS 2019 16.8 Preview 3
#define __cpp_lib_coroutine 197000L
#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

#define __cpp_lib_destroying_delete 201806L
Expand Down
19 changes: 19 additions & 0 deletions tests/std/tests/VSO_0157762_feature_test_macros/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,25 @@ STATIC_ASSERT(__cpp_lib_constexpr_utility == 201811L);
#endif
#endif

#if _HAS_CXX20 && defined(__cpp_impl_coroutine) // TRANSITION, Clang and EDG coroutine support
#if __cpp_impl_coroutine >= 201902L
#define ExpectedCppLibCoroutine 201902L
#else
#define ExpectedCppLibCoroutine 197000L // TRANSITION, VS 2019 16.8 Preview 4
#endif
#ifndef __cpp_lib_coroutine
#error __cpp_lib_coroutine is not defined
#elif __cpp_lib_coroutine != ExpectedCppLibCoroutine
#error __cpp_lib_coroutine is not ExpectedCppLibCoroutine
#else
STATIC_ASSERT(__cpp_lib_coroutine == ExpectedCppLibCoroutine);
#endif
#else
#ifdef __cpp_lib_coroutine
#error __cpp_lib_coroutine is defined
#endif
#endif

#if _HAS_CXX20
#ifndef __cpp_lib_destroying_delete
#error __cpp_lib_destroying_delete is not defined
Expand Down