Skip to content

Conversation

@StephanTLavavej
Copy link
Member

Works towards #40.

Now that Victor Tong has implemented symmetric coroutine transfer for VS 2019 16.8 Preview 3 (Microsoft-internal MSVC-PR-267685), we can activate the library's feature-test macro.

Because Clang and EDG don't define __cpp_impl_coroutine yet, I'm structuring this in a cautious way. If we're in C++20 mode, and the compiler defines __cpp_impl_coroutine (true for MSVC right now), we'll inspect the value - if it's the Standard value (or newer, just in case), we'll define the library macro to the Standard value (which happens to be the same). If it's a pre-Standard value (true for MSVC as of VS 2019 16.8 Preview 1 right now, will probably be true until VS 2019 16.8 Preview 4), we'll define the library macro to the pre-Standard value of Nulluary 1970.

I'm updating the feature-test macro test accordingly. This adaptive behavior should allow the tests to continue passing as the compilers light up their impl macros. Adaptive behavior has been problematic in the past when we use a feature-test macro internally to activate code, but here it is precisely targeted at the <coroutine> header which is currently a pure leaf.

I'm also removing the "partially implemented" comment, since we've merged noop coroutines. However, #40 will remain open until we add end-to-end test coverage for MSVC. (At that time we'll probably spin off separate issues for the remaining checkboxes.)

@StephanTLavavej StephanTLavavej added the cxx20 C++20 feature label Aug 18, 2020
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner August 18, 2020 04:06
@StephanTLavavej StephanTLavavej added the high priority Important! label Aug 18, 2020
@CaseyCarter
Copy link
Contributor

We've been co_awaiting completion of the <coroutine> support for quite a while now, it's nice to see this work co_yield such great results. 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cxx20 C++20 feature high priority Important!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants