co_yield expression expression allows it to write a generator function. The generator function returns a new value each time. A generator function is a kind of data stream from which you can pick values. The data stream can be infinite. Consequentially, we are in the center of lazy evaluation.

1096

uses the keyword co_yield to suspend execution returning a value generator < int > iota ( int n = 0 ) { while ( true ) co_yield n ++ ; } uses the keyword co_return to complete execution returning a value

For now it can parse some basic uses of co_await, co_yield and co_return and diagnose some erroneous cases. This manifests as a difference in -std=c++11 behavior between Clang 3.5.1 (shipped January 2015) and Clang 3.8 (shipped March 2016) — not as a difference between -std=c++11 and -std=c++17 on any compiler! So in this sense, to “resolve foo as a DR” connotes “to apply the same fix uniformly across all language modes.” EBO, EBCO Coroutines Yehezkel Bernat yehezkelshb@gmail.com Core C++ Meetup, Sep. 2018 layout: true