cpp-coroutines - C++20 Coroutines Skill
Understand and debug C++20 coroutine mechanics including co_await, co_yield, co_return, promise_type, and frame memory layout
Tags
Updated: 2026-06-30Capabilities
Typical Inputs
Typical Outputs
What this skill does
- explain co_await
- explain co_yield
- explain co_return
- implement promise_type
- write awaitable
- write generator
- read coroutine frame
- read coroutine handle
- debug coroutine in GDB
- read frame allocation
- read compilation time
- list coroutine pitfalls
- create coroutine type
- create Task type
- use std::generator
- use co_spawn
- test coroutine code
- analyze coroutine code
Inputs
- C++20 coroutine code
- coroutine_type definition
- coroutine_handle variable
- GDB debugging session
- Compiler Explorer instance
- coroutine frame structure
- compilation time report
Outputs
- coroutine implementation
- Task implementation
- Generator implementation
- Awaitable implementation
- frame analysis result
- debugging report
- compilation time report
- pitfall list
- usage example
Requirements
- C++20 compiler
- <coroutine> header
- GDB debugger
- Boost.Asio library
- C++23 compiler
- -O2 optimization
