Skip to content

Library support for C++20 coroutines - #894

Merged
Casey Carter (CaseyCarter) merged 6 commits into
microsoft:masterfrom
joemmett:standard_coroutines
Jun 17, 2020
Merged

Library support for C++20 coroutines#894
Casey Carter (CaseyCarter) merged 6 commits into
microsoft:masterfrom
joemmett:standard_coroutines

Conversation

@joemmett

@joemmett Jonathan Emmett (joemmett) commented Jun 12, 2020

Copy link
Copy Markdown
Member

Implements most of <coroutine>. Usefulness of this header is dependent
on a compatible compiler (e.g. Visual Studio 2019 16.8 Preview 1 or
later) that defines __cpp_impl_coroutine. With such a compiler
this header exposes the coroutine library support in the std namespace
without the need for an /await switch.

This implementation is not yet complete:

  • noop coroutines are not yet implemented
  • symmetric transfer is not yet implemented

The value of __cpp_lib_coroutine is defined to a value less than the
Standard-mandated value to represent the incomplete feature.

Partially addresses #40.

[This is the STL portion of internal MSVC-PR-253905.]

Implements most of <coroutine>. Usefulness of this header is dependent
on a compatible compiler (e.g. Visual Studio 2019 16.8 Preview 1 or
later) that defines `__cpp_impl_coroutine`. With such a compiler
this header exposes the coroutine library support in the `std` namespace
without the need for an `/await` switch.

This implementation is not yet complete:

- noop coroutines are not yet implemented
- symmetric transfer is not yet implemented

The value of `__cpp_lib_coroutine` is defined to a value less than the
Standard-mandated value to represent the incomplete feature.
@joemmett
Jonathan Emmett (joemmett) requested a review from a team as a code owner June 12, 2020 18:23
Comment thread stl/inc/coroutine Outdated
Comment thread stl/inc/coroutine Outdated
@CaseyCarter Casey Carter (CaseyCarter) added the cxx20 C++20 feature label Jun 12, 2020
Comment thread stl/inc/coroutine Outdated
Grammar change in pragma message

Co-authored-by: Daniel Marshall <xandan@gmail.com>
Comment thread tests/std/tests/VSO_0971246_legacy_await_headers/env.lst Outdated
Comment thread stl/inc/yvals_core.h Outdated
Comment thread stl/inc/yvals_core.h Outdated
Comment thread stl/inc/yvals_core.h Outdated
#define __cpp_lib_constexpr_tuple 201811L
#define __cpp_lib_constexpr_utility 201811L

#ifdef __cpp_impl_coroutine // TRANSITION, VS 2019 16.8

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know when Clang will support this?

Comment thread stl/inc/experimental/generator Outdated
Comment thread stl/inc/experimental/resumable Outdated
Comment thread stl/inc/coroutine Outdated
Comment thread stl/inc/coroutine Outdated
Comment thread stl/inc/coroutine Outdated
Comment thread stl/inc/coroutine Outdated
Comment thread stl/inc/coroutine

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; last remaining issue is the rephrasing mentioned in #894 (comment) .

@CaseyCarter
Casey Carter (CaseyCarter) merged commit 0cdf5fb into microsoft:master Jun 17, 2020
@CaseyCarter

Copy link
Copy Markdown
Contributor

Thanks for your co_contribution!

ahanamuk pushed a commit to ahanamuk/STL that referenced this pull request Jun 25, 2020
* Library support for C++20 coroutines

Implements most of <coroutine>. Usefulness of this header is dependent
on a compatible compiler (e.g. Visual Studio 2019 16.8 Preview 1 or
later) that defines `__cpp_impl_coroutine`. With such a compiler
this header exposes the coroutine library support in the `std` namespace
without the need for an `/await` switch.

This implementation is not yet complete:

- noop coroutines are not yet implemented
- symmetric transfer is not yet implemented

The value of `__cpp_lib_coroutine` is defined to a value less than the
Standard-mandated value to represent the incomplete feature.

Co-authored-by: Daniel Marshall <xandan@gmail.com>
ahanamuk pushed a commit to ahanamuk/STL that referenced this pull request Jun 26, 2020
* Library support for C++20 coroutines

Implements most of <coroutine>. Usefulness of this header is dependent
on a compatible compiler (e.g. Visual Studio 2019 16.8 Preview 1 or
later) that defines `__cpp_impl_coroutine`. With such a compiler
this header exposes the coroutine library support in the `std` namespace
without the need for an `/await` switch.

This implementation is not yet complete:

- noop coroutines are not yet implemented
- symmetric transfer is not yet implemented

The value of `__cpp_lib_coroutine` is defined to a value less than the
Standard-mandated value to represent the incomplete feature.

Co-authored-by: Daniel Marshall <xandan@gmail.com>
ahanamuk pushed a commit to ahanamuk/STL that referenced this pull request Jun 29, 2020
* Library support for C++20 coroutines

Implements most of <coroutine>. Usefulness of this header is dependent
on a compatible compiler (e.g. Visual Studio 2019 16.8 Preview 1 or
later) that defines `__cpp_impl_coroutine`. With such a compiler
this header exposes the coroutine library support in the `std` namespace
without the need for an `/await` switch.

This implementation is not yet complete:

- noop coroutines are not yet implemented
- symmetric transfer is not yet implemented

The value of `__cpp_lib_coroutine` is defined to a value less than the
Standard-mandated value to represent the incomplete feature.

Co-authored-by: Daniel Marshall <xandan@gmail.com>
ahanamuk pushed a commit to ahanamuk/STL that referenced this pull request Jul 1, 2020
* Library support for C++20 coroutines

Implements most of <coroutine>. Usefulness of this header is dependent
on a compatible compiler (e.g. Visual Studio 2019 16.8 Preview 1 or
later) that defines `__cpp_impl_coroutine`. With such a compiler
this header exposes the coroutine library support in the `std` namespace
without the need for an `/await` switch.

This implementation is not yet complete:

- noop coroutines are not yet implemented
- symmetric transfer is not yet implemented

The value of `__cpp_lib_coroutine` is defined to a value less than the
Standard-mandated value to represent the incomplete feature.

Co-authored-by: Daniel Marshall <xandan@gmail.com>
@joemmett
Jonathan Emmett (joemmett) deleted the standard_coroutines branch March 11, 2021 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cxx20 C++20 feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants