P4007R0 — Senders and Coroutines (5 items) LEWG
Vinnie Falco, Mungo Gill
This paper identifies four structural gaps where the sender model (std::execution) meets coroutines: error reporting via channels incompatible with I/O tuple completions, the absence of a natural co_return error path requiring a language change, the inability to propagate frame allocators to coroutine frames, and the lack of symmetric transfer through sender composition. These gaps are characterized as inherent tradeoffs of the sender model's compile-time analysis properties, not design defects. The paper recommends shipping std::execution for C++26, deferring std::execution::task to C++29, and exploring coroutine-native I/O designs alongside sender-based designs.

References — Anthropic Citations API

[1]
"(metadata) "Date: 2026-02-22" / (revision history) "R0: March 2026 (pre-Croydon mailing)""
[2]
"Under Dimov's mapping - the best known convention - consider the same read_body from Section 3.2, written with std::execution::task."
[3]
"2021 (Feb, SG4 telecon): During review of P0958R3, a participant stated that sender/receivers have a loss because they do not have success/partial-success."
[4]
"Sources: cppcoro[42], libcoro[47], asyncpp[46], aiopp[48], P3552R3 ref. impl.[49]"
Summary: P4007R0 proposes a design for integrating C++ coroutines with the sender/receiver model from P2300, providing awaitable-to-sender and sender-to-awaitable conversions along with a task type and ergonomic patterns for mixing both paradigms. Four items were found, spanning an internal date contradiction, a wrong function name cross-reference, and two missing or incomplete citations.
Pipeline: Discovery (Anthropic Opus + Citations API) → Verification Gate (OpenRouter Opus) → Report Writer (OpenRouter Opus)
Provenance: All references are machine-verified character positions from the Anthropic Citations API — deterministic, exact substrings, not model-generated quotes.