No Compiler Required - Hand-Rolling C++20 Coroutines in C++17 - Johannes Kalmbach - C++Now 2026 @CppNow
No Compiler Required - Hand-Rolling C++20 Coroutines in C++17 - Johannes Kalmbach - C++Now 2026  @CppNow
Uploaded August 2026 | Updated December 2026, 3 hours ago
https://www.cppnow.org​
---

No Compiler Required - Hand-Rolling C++20 Coroutines in C++17 - Johannes Kalmbach - C++Now 2026
---

How does co_await actually work? Not only at the "promise_type customization point" level, but at the level of the state machine the compiler emits on your behalf.

In this talk, we will take C++20 coroutines apart by manually transforming them into equivalent C++17 state machines, starting with a simple generator and building up to coroutines involving symmetric transfer and exception propagation. Each transformation exposes a subtlety that is easy to overlook when the compiler does the work for us: coroutine frame layout, suspension point indexing, lifetime of locals across suspension points, and the surprisingly tricky semantics of initial_suspend and final_suspend. By the end, you will have a mental model precise enough to reason about compiler codegen, debug coroutine-related issues, and evaluate the design tradeoffs baked into the C++20 coroutine specification.

Because the transformations only touch the coroutine body (the promise_type, awaitables, and other customization points remain virtually unchanged) the coroutine infrastructure itself becomes a library-level concern, and we can change it. We demonstrate this by swapping the default stackless machinery for a stackful alternative that, for simple generators, matches the performance of handwritten iterators and ranges. Finally, we show that the tedious manual rewriting can be automated with a source-to-source rewriter built on LLVM's LibTooling, making a case for why reimplementing core language features as library code can be practically valuable even when the compiler already provides them.
---

Slides: github.com/boostcon/cppnow_presentations_2026/blob/main/Presentations/No_Compiler_Required.pdf

think-cell develops one of the world’s leading PowerPoint applications, with C++ at the core of everything we build, from layout algorithms to deep integration with Microsoft Office. Interested in working on challenging C++ problems with real-world impact? Explore our open roles: think-cell.com/en/career/tech
---

Johannes Kalmbach

I am a researcher and PhD candidate at the University of Freiburg (Germany) where I use modern C++ to build QLever, a highly efficient RDF graph database for knowledge graphs with hundreds of billions of statements. I have recently cofounded QLeverize AG which provides commercial support for QLever. If it was purely up to me, our codebase would already be running C++29 today.
---

C++Now is an annual onsite international C++ programming and coding conference held in Aspen, Colarado. For all C++ developers, C++ software engineers and those involved with the C++ language, CppNow provides an indepth and technical content provided by the best and brightest C++ experts of the C++ world.
Annual CppNow Conference - cppnow.org
linkedin.com/company/cppnow​
twitter.com/cppnow
facebook.com/CppNow
reddit.com/r/CppNow
https://mastodon.social/@cppnow
Video Sponsors: Bloomberg
---

Videos Filmed & Edited By Bash Films: bashfilms.com
YouTube Channel Managed & Optimized By Digital Medium Ltd: events.digital-medium.co.uk
---

#boost #cpp #cplusplus #programming #coding #softwareengineering #softwaredeveloper #code #cplusplusprogramming #cplusplustutorial #cplus #softwaredevelopment #coder #talk
No Compiler Required - Hand-Rolling C++20 Coroutines in C++17 - Johannes Kalmbach - C++Now 2026Generic Programming for Multidimensional Arrays - Alfredo A. Correa - C++Now 2026The Morning Briefing - C++ Concurrency Before the Hardware Reckoning - Fedor Pikus - C++Now 2026Lightning Talk: Hilberts Hotel - Counting to Infinity and Beyond - Tobias Loew - C++Now 2025Generic Arity: Definition-Checked Variadics in Carbon - Geoffrey Romer - C++Now 2024What Every C++ Programmer Needs to Know About AI - Jody Hagins - C++Now 2026C++Now 2024 Session Preview - Interview With Zach Laine by @cppeventsSignal Trees - A Deep Dive into a High-Performance Alternative to Queue-Based Task SchedulingLightning Talk: C++ Rvalue Ranges Aren’t Always Yours - Robert Leahy - C++Now 2025CMake’s Recent Evolution - Modules, CPS, and Build Optimization - Bill Hoffman - C++Now 2026How to Build a Flexible Robot Brain One Bit at a Time - Ramon Perez - C++Now 2025Coroutines for Dummies - Dominic Fischer - C++Now 2026
CppNow |

No Compiler Required - Hand-Rolling C++20 Coroutines in C++17 - Johannes Kalmbach - C++Now 2026

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER