Document Number: P0912R4
Date: 2019-01-16
Audience: WG21
Revises: P0912R3
Reply to: gorn@microsoft.com

Merge Coroutines TS into C++20 working draft

Abstract

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

Revision history

r0: initial revision

r1:

r2:

r3:

r4:

Introduction

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

Wording

Rationale: Required for new features.
...
(1.5) -- ... 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 char8_t, concept, consteval, 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: <bit>, <compare>, <contracts>, <coroutine>, <span>, <syncstream>, and <version>. Valid C++ 2017 code that #includes headers with these names may be invalid in this International Standard.