@@ -30,9 +30,70 @@ Also AS-EXCEPT-PTR can throw for the `error_code` case
3030(that might be worth a separate issue though).
3131</p >
3232
33+ <note >2026-03-27; Tim adds wording following LWG discussion</note >
34+
3335</discussion >
3436
3537<resolution >
38+
39+
40+ <p >
41+ This wording is relative to <paper num =" N5032" />.
42+ </p >
43+
44+ <ol >
45+
46+ <li ><p >Modify <sref ref =" [exec.as.awaitable]" /> as indicated:</p >
47+
48+ <blockquote >
49+ <p >
50+ -4- Let `rcvr` be an rvalue expression of type <tt ><i >awaitable-receiver</i ></tt >, let
51+ `crcvr` be a const lvalue that refers to `rcvr`, let `vs` be a pack of subexpressions,
52+ and let `err` be an expression of type `Err`. <ins >Let <code ><i >MAKE-NOEXCEPT</i >(e)</code >
53+ for some subexpression `e` be expression-equivalent to
54+ <code >[] noexcept -> decltype(auto) { return (e); }()</code >.</ins > Then:
55+ </p >
56+ <ol style =" list-style-type: none" >
57+ <li ><p >(4.1) — If <tt >constructible_from< <i >result-type</i >, decltype((vs))...> </tt > is satisfied,
58+ the expression `set_value(rcvr, vs...)` is equivalent to:
59+ </p >
60+ <blockquote ><pre >
61+ try {
62+ rcvr.<i >result-ptr</i >-> template emplace< 1> (vs...);
63+ } catch(...) {
64+ rcvr.<i >result-ptr</i >-> template emplace< 2> (current_exception());
65+ }
66+ <ins ><i >MAKE-NOEXCEPT(</i ></ins >rcvr.<i >continuation</i >.resume()<ins >)</ins >;
67+ </pre ></blockquote >
68+ <p >
69+ Otherwise, `set_value(rcvr, vs...)` is ill-formed.</p ></li >
70+ <li ><p >(4.2) — The expression `set_error(rcvr, err)` is equivalent to:</p >
71+
72+ <blockquote ><pre >
73+ <ins >try {</ins >
74+ rcvr.<i >result-ptr</i >-> template emplace< 2> (<i >AS-EXCEPT-PTR</i >(err));
75+ <ins >} catch(...) {
76+ rcvr.<i >result-ptr</i >-> template emplace< 2> (current_exception());
77+ }</ins >
78+ <ins ><i >MAKE-NOEXCEPT(</i ></ins >rcvr.<i >continuation</i >.resume()<ins >)</ins >;
79+ </pre ></blockquote >
80+ </li >
81+ <li ><p >(4.3) — The expression `set_stopped(rcvr)` is equivalent to:</p >
82+ <blockquote ><pre >
83+ <ins ><i >MAKE-NOEXCEPT(</i ></ins >static_cast< coroutine_handle<>> (rcvr.continuation.promise().unhandled_stopped()).resume()<ins >)</ins >;
84+ </pre ></blockquote >
85+ </li >
86+ <li ><p >(4.4) — For any expression `tag` whose type satisfies <code ><i >forwarding-query</i ></code >
87+ and for any pack of subexpressions `as`, `get_env(crcvr).query(tag, as...)` is expression-equivalent to:</p >
88+ <blockquote ><pre >
89+ tag(get_env(as_const(<ins ><i >MAKE-NOEXCEPT(</i ></ins >crcvr.continuation.promise()<ins >)</ins >)), as...)
90+ </pre ></blockquote >
91+ </li >
92+ </ol >
93+ </blockquote >
94+
95+ </li >
96+ </ol >
3697</resolution >
3798
3899</issue >
0 commit comments