Understanding C++ Coroutines by Example: Generators (Part 2 of 2)
summary
Concrete implementation of C++20 coroutines for generators shows the exact promise changes, an implements iterator-based generators design with begin/end semantics, and how reference, increment and exception propagation actually work. The talk builds recursive generators and an async-generator prototype using a continuation field, final awaitable and symmetric transfer to resume continuations, and reports the surprising specification quirk in the C++23 proposal that begin may be consumptive / callable only once. Code and slides are available on the linked repository.
AI-written summary · about
chapters (7)
- 0:00Implementing generators
- 2:36Promise and iterator design
- 13:38Handling coroutine flow
- 20:36Lazy iteration patterns
- 24:31Recursive generators
- 36:37Standard library proposal
- 43:50Asynchronous generators








