P4007R0 — Senders and Coroutines
(5 items)
LEWG
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.
- Section 3.8, page 11 — Prose says "the same read_body from Section 3.2" but the function defined in Section 3.2 is named read, not read_body. [1]
- Section 7.5, page 22 — Sources line cites five libraries but the comparison table contains six entries; Boost.Cobalt is present in the table but omitted from the source citation line. [2]
- Appendix A.3, page 28 — P0958R3 is referenced in the timeline but has no corresponding entry in the References section (pages 32-34). [3]
- Page 1, metadata and Revision History — Document date is 2026-02-22 (February) but the revision history states R0 is March 2026; the two are inconsistent. [4]
References — Anthropic Citations API
[1]
"(metadata) "Date: 2026-02-22" / (revision history) "R0: March 2026 (pre-Croydon mailing)""
"(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."
"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."
"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]"
"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.
Provenance: All references are machine-verified character positions from the Anthropic Citations API — deterministic, exact substrings, not model-generated quotes.