Skip to content

Commit 40f6fef

Browse files
committed
New issue from Eric Niebler: "Specification of completion-signatures-for in [exec.snd.expos]/p39 is recursive"
1 parent 37ea98d commit 40f6fef

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

xml/issue4190.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="4190" status="New">
5+
<title>Specification of <i>completion-signatures-for</i> in [exec.snd.expos]/p39 is recursive</title>
6+
<section><sref ref="[exec.snd.expos]"/></section>
7+
<submitter>Eric Niebler</submitter>
8+
<date>2 Jan 2025</date>
9+
<priority>99</priority>
10+
11+
<discussion>
12+
<p>
13+
<sref ref="[exec.snd.expos]"/>/p39 reads:
14+
</p>
15+
<blockquote style="border-left: 3px solid #ccc;padding-left: 15px;">
16+
<p>
17+
For a subexpression `sndr` let `Sndr` be `decltype((sndr))`. Let `rcvr` be a receiver with an associated
18+
environment of type `Env` such that <tt>sender_in&lt;Sndr, Env&gt;</tt> is `true`.
19+
<tt><i>completion-signatures-for</i>&lt;Sndr, Env&gt;</tt> denotes a specialization of `completion_signatures`,
20+
the set of whose template arguments correspond to the set of completion operations that are potentially
21+
evaluated as a result of starting (<sref ref="[exec.async.ops]"/>) the operation state that results from
22+
connecting `sndr` and `rcvr`. When <tt>sender_in&lt;Sndr, Env&gt;</tt> is `false`, the type denoted
23+
by <tt><i>completion-signatures-for</i>&lt;Sndr, Env&gt;</tt>, if any, is not a specialization of
24+
`completion_signatures`.
25+
</p>
26+
</blockquote>
27+
<p>
28+
This paragraph is trying to specify the return type of <tt><i>basic-sender</i>::get_completion_signatures</tt>,
29+
but it immediately goes off the rails when it tests for the satisfaction of <tt>sender_in&lt;Sndr, Env&gt;</tt>.
30+
The <tt>sender_in&lt;Sndr, Env&gt;</tt> concept requires that <tt>get_completion_signatures(sndr, env)</tt> is
31+
well-formed and that its type is a specialization of <tt>completion_signatures</tt>. But the return type of
32+
`get_completion_signatures(sndr, env)` is exactly the thing this para is trying to define!
33+
</p>
34+
</discussion>
35+
36+
<resolution>
37+
<p>
38+
This wording is relative to <paper num="N5001"/>.
39+
</p>
40+
41+
<ol>
42+
43+
<li><p>Modify <sref ref="[exec.snd.expos]"/> as indicated:</p>
44+
45+
<blockquote><p>
46+
-39- <ins>Let type `Sndr` be a (possibly `const`-qualified) specialization of <tt><i>basic-sender</i></tt>
47+
or an lvalue reference of such, and let `Rcvr` be the type of a receiver with an associated environment
48+
of type `Env`. If the type <tt><i>basic-operation</i>&lt;Sndr, Rcvr&gt;</tt> is well-formed, let `op` be
49+
an lvalue subexpression of that type.</ins><del>For a subexpression `sndr` let `Sndr` be `decltype((sndr))`.
50+
Let `rcvr` be a receiver with an associated environment of type `Env` such that <tt>sender_in&lt;Sndr, Env&gt;</tt>
51+
is `true`.</del> <tt><i>completion-signatures-for</i>&lt;Sndr, Env&gt;</tt> denotes a specialization of
52+
`completion_signatures`, the set of whose template arguments correspond to the set of completion operations
53+
that are potentially evaluated <ins>(<sref ref="[basic.def.odr]"/>)</ins> as a result of
54+
<ins>evaluating `op.start()`.</ins><del>starting (<sref ref="[exec.async.ops]"/>) the operation state that results from
55+
connecting `sndr` and `rcvr`. When <tt>sender_in&lt;Sndr, Env&gt;</tt> is `false`</del><ins>Otherwise</ins>,
56+
the type denoted by <tt><i>completion-signatures-for</i>&lt;Sndr, Env&gt;</tt>, if any, is not a
57+
specialization of `completion_signatures`.
58+
<p/>
59+
<i>Recommended practice</i>: When <ins>the type <tt><i>basic-operation</i>&lt;Sndr, Rcvr&gt;</tt> is
60+
ill-formed</ins><del><tt>sender_in&lt;Sndr, Env&gt;</tt> is `false`</del>, implementations are encouraged
61+
to use the type denoted by <tt><i>completion-signatures-for</i>&lt;Sndr, Env&gt;</tt> to communicate to
62+
users why.
63+
64+
</p></blockquote>
65+
</li>
66+
</ol>
67+
68+
</resolution>
69+
70+
</issue>

0 commit comments

Comments
 (0)