You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The definition of <code><i>error-variant</i></code> isn't needed, i.e., remove <srefref="[task.promise]"/> paragraph 2:
105
+
<blockquote>
106
+
<p><del>
107
+
-2- <code><i>error-variant</i></code> is a <code>variant<monostate, remove_cvref_t<E>...></code>, with duplicate types removed, where <code>E...</code> are template arguments of the specialization of <code>execution::completion_signatures</code> denoted by <code>error_types</code>.
108
+
</del></p>
109
+
</blockquote>
110
+
</p>
111
+
<p>
112
+
In <srefref="[task.promise]"/> change paragraph 7 to use the members added to <code><i>state</i></code>:
113
+
<blockquote>
114
+
<pre>auto final_suspend() noexcept</pre>
115
+
<p>-7- <i>Returns</i>: An awaitable object of unspecified type (<srefref="[expr.await]"/>) whose member functions arrange for the completion of the asynchronous operation associated with <code><i>STATE</i>(*this)</code><del> by invoking</del><ins>. Let <code>st</code> be a reference to <code><i>STATE</i>(*this)</code>. The asynchronous completion first destroys the coroutine frame using <code>st.<i>handle</i>.destroy()</code> and then invokes</ins>:</p>
116
+
117
+
<ul>
118
+
<li>-7.1- <code>set_error(std::move(<del><i>RCVR</i>(*this)</del><ins>st.<i>rcvr</i></ins>), std::move(<del>e</del><ins>st.<i>error</i></ins>))</code> if <del><code><i>errors</i>.index()</code> is greater than zero and <code>e</code> is the value held by <code><i>errors</i></code></del><ins><code>bool(st.<i>error</i>)</code> is <code>true</code></ins>, otherwise</li>
119
+
<li>-7.2- <code>set_value(std::move(<del><i>RCVR</i>(*this)</del><ins>st.<i>rcvr</i></ins>))</code> if <code>is_void<T></code> is <code>true</code>, and otherwise</li>
Change the specification of <code>yield_value</code> to destroy the coroutine frame before invoking the <code>set_error</code> completion, i.e., change <srefref="[task.promise]"/> paragraph 9:
126
+
<blockquote>
127
+
<p>-9- <i>Returns</i>: An awaitable object of unspecified type ([expr.await]) whose member functions arrange for the calling coroutine to be suspended and then completes the asynchronous operation associated with <code><i>STATE</i>(*this)</code><del> by</del><ins>. Let <code>st</code> be a reference to <code><i>STATE</i>(*this)</code>. Then the asynchronous operation completes by first destroying the coroutine frame using <code>st.<i>handle</i>.destroy()</code> and then</ins> invoking <code>set_error(std::move(<del><i>RCVR</i>(*this)</del><ins>st.<i>rcvr</i></ins>), Cerr(std::move(err.error)))</code>.
128
+
</p>
129
+
</blockquote>
130
+
</p>
131
+
<p>
132
+
Change the specification of <code>unhandled_stopped</code> to destroy the coroutine frame before invoking the <code>set_stopped</code> completion, i.e., change <srefref="[task.promise]"/> paragraph 13:
<p>-13- <i>Effects</i>: Completes the asynchronous operation associated with <code><i>STATE</i>(*this)</code><del> by</del><ins>. Let <code>st</code> be a reference to <code><i>STATE</i>(*this)</code>. The asynchronous operation is completed by first destroying the coroutine frame using <code>st.<i>handle</i>.destroy()</code> and then</ins> invoking <code>set_stopped(std::move(<del><i>RCVR</i>(*this)</del><ins>st.<i>rcvr</i></ins>))</code>.</p>
136
+
</blockquote>
137
+
</p>
138
+
</superseded>
139
+
140
+
<note>2025-11-07; Jonathan provides improved wording</note>
141
+
<p>
142
+
Incorporate change from LWG <irefref="4466"/> and add `_v` to `is_void`.
143
+
</p>
144
+
63
145
</discussion>
64
146
65
147
<resolution>
148
+
66
149
<p>
67
150
In <srefref="[task.state]"/>, add
68
151
exposition-only data members <code><i>result</i></code> and
@@ -118,8 +201,8 @@ In <sref ref="[task.promise]"/> change paragraph 7 to use the members added to <
118
201
119
202
<ul>
120
203
<li>-7.1- <code>set_error(std::move(<del><i>RCVR</i>(*this)</del><ins>st.<i>rcvr</i></ins>), std::move(<del>e</del><ins>st.<i>error</i></ins>))</code> if <del><code><i>errors</i>.index()</code> is greater than zero and <code>e</code> is the value held by <code><i>errors</i></code></del><ins><code>bool(st.<i>error</i>)</code> is <code>true</code></ins>, otherwise</li>
121
-
<li>-7.2- <code>set_value(std::move(<del><i>RCVR</i>(*this)</del><ins>st.<i>rcvr</i></ins>))</code> if <code>is_void<T></code> is <code>true</code>, and otherwise</li>
<li>-7.2- <code>set_value(std::move(<del><i>RCVR</i>(*this)</del><ins>st.<i>rcvr</i></ins>))</code> if <code>is_void<ins>_v</ins><T></code> is <code>true</code>, and otherwise</li>
0 commit comments