JTC 1/SC 22/WG 23 C++ Vulnerability Discussions WG 23 N1508 September 18 2025 Participants Stephen Michell - convenor, SCC Richard Corden - USA Erhard Ploedereder - liaison Paul Preney - Canada Peter Sommerlad Regrets Matt Butler - USA Loic Joly - AFNOR Actions: Scheduled meeting 1 Sep 2025 was cancelled. Welcome back to Peter! Issues addressed Clause 7.5 Coroutines Provided an initial writeup of coroutines by Paul. Group editing. Significant more needed. Paul to restructure as 1) using coroutines defined in library environments 2) roll-your-own coroutines. Paul will separate the clause 7 material into separate files for better control. Issue XXX FROM THE CHAT 2025-09-15: 10:27:27 From Peter Sommerlad to Everyone: [\[EWF\]](#EWF) 11:27:36 From Peter Sommerlad to Everyone: The coroutine promise_type (as given by std::coroutine_traits::promise_type) is distinct from std::promise 11:33:23 From Paul Preney to Everyone: Section 17.2 Coroutines [support.coroutine] 11:33:33 From Paul Preney to Everyone: in C++23 11:50:48 From Peter Sommerlad to Everyone: tmp = obtain_value(); 11:50:58 From Peter Sommerlad to Everyone: int obtain_value(){ 11:51:26 From Peter Sommerlad to Everyone: std::scoped_lock lg{m}; return i; 12:02:54 From Stephen Michell to Everyone: ```{.cpp} std::mutex m; int i = 42; // ... std::generator bar() { std::unique_lock lk{m}; auto const tmp{i}; // make a copy lk.unlock(); // release the lock co_yield tmp; // yield the copy with no locks held } ``` 12:04:36 From Peter Sommerlad to Everyone: ```{.cpp} std::mutex m; int i = 42; // ... int bar_impl(){ std::scoped_lock lk{m}; return i; } std::generator bar() { co_yield bar_impl(); // yield a copy with no locks held } ```