Skip to content

Commit f4b7b2a

Browse files
committed
New issue from Lewis Baker: "awaitable-sender concept should qualify use of awaitable-receiver type"
1 parent f533956 commit f4b7b2a

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

xml/issue4360.xml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4360" status="New">
5+
<title><tt><i>awaitable-sender</i></tt> concept should qualify use of <tt><i>awaitable-receiver</i></tt> type</title>
6+
<section>
7+
<sref ref="[exec.as.awaitable]"/>
8+
</section>
9+
<submitter>Lewis Baker</submitter>
10+
<date>27 Aug 2025</date>
11+
<priority>99</priority>
12+
13+
<discussion>
14+
<p>
15+
In <sref ref="[exec.as.awaitable]"/> p1 there is an exposition-only helper concept
16+
<tt><i>awaitable-sender</i></tt> defined as follows:
17+
</p>
18+
<blockquote><pre>
19+
namespace std::execution {
20+
template&lt;class Sndr, class Promise&gt;
21+
concept <i>awaitable-sender</i> =
22+
<i>single-sender</i>&lt;Sndr, env_of_t&lt;Promise&gt;&gt; &amp;&amp;
23+
sender_to&lt;Sndr, <i>awaitable-receiver</i>&gt; &amp;&amp; // <i>see below</i>
24+
requires (Promise&amp; p) {
25+
{ p.unhandled_stopped() } -> convertible_to&lt;coroutine_handle&lt;&gt;&gt;;
26+
};
27+
}
28+
</pre></blockquote>
29+
<p>
30+
The mention of the type <tt><i>awaitable-receiver</i></tt> here does not refer to any exposition-only type
31+
defined at namespace-scope. It seems to, instead, be referring to the nested member-type
32+
<tt><i>sender-awaitable</i>&lt;Sndr, Promise&gt;::<i>awaitable-receiver</i></tt> and so should be
33+
qualified as such.
34+
</p>
35+
</discussion>
36+
37+
<resolution>
38+
<p>
39+
This wording is relative to <paper num="N5014"/>.
40+
</p>
41+
42+
<ol>
43+
44+
<li><p>Modify <sref ref="[exec.as.awaitable]"/> as indicated:</p>
45+
46+
<blockquote>
47+
<p>
48+
-1- `as_awaitable` transforms an object into one that is awaitable within a particular coroutine.
49+
Subclause <sref ref="[exec.coro.util]"/> makes use of the following exposition-only entities:
50+
</p>
51+
<blockquote><pre>
52+
namespace std::execution {
53+
template&lt;class Sndr, class Promise&gt;
54+
concept <i>awaitable-sender</i> =
55+
<i>single-sender</i>&lt;Sndr, env_of_t&lt;Promise&gt;&gt; &amp;&amp;
56+
sender_to&lt;Sndr, <ins>typename <i>sender-awaitable</i>&lt;Sndr, Promise&gt;::</ins><i>awaitable-receiver</i>&gt; &amp;&amp; // <i>see below</i>
57+
requires (Promise&amp; p) {
58+
{ p.unhandled_stopped() } -> convertible_to&lt;coroutine_handle&lt;&gt;&gt;;
59+
};
60+
[&hellip;]
61+
}
62+
</pre></blockquote>
63+
</blockquote>
64+
65+
</li>
66+
67+
</ol>
68+
</resolution>
69+
70+
</issue>

0 commit comments

Comments
 (0)