Document Number: P0912R3
Date: 2018-10-02
Audience: WG21
Revises: P0912R2
Reply to:

Merge Coroutines TS into C++20 working draft


This paper proposes merging Working Draft of Coroutines TS [N4775] into the C++20 working draft [N4762].

Revision history

r0: initial revision





Coroutines address the dire need by dramatically simplifying development of asynchronous code. Coroutines have been available and in use for 4 years. We have shipping implementations from two major compiler vendors. It is time to merge Coroutines TS to the working paper.


Rationale: Required for new features. The requires keyword is added to introduce constraints through a requires-clause or a requires-expression. The concept keyword is added to enable the definition of concepts (12.6.8). The co_await, co_yield, and co_return keywords are added to enable the definition of coroutines (\ref{dcl.fct.def.coroutine}). Effect on original feature: Valid ISO C++ 2017 code using concept, co_await, co_yield, co_return, or requires as an identifier is not valid in this International Standard.

Effect on original feature: The following C++ headers are new: <compare>, <coroutine>, and <syncstream>. Valid C++ 2017 code that #includes headers with these names may be invalid in this International Standard.