Skip to content

Commit ebfe55e

Browse files
committed
New issue from Eric Niebler: constraints on schedule_from's get-state function are incorrect
1 parent 5d36176 commit ebfe55e

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed

xml/issue4198.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ except with duplicate types removed.
8888
</blockquote>
8989

9090
</p>
91+
92+
<note>This touches the same text as LWG <iref ref="4203"/>.</note>
9193
</discussion>
9294

9395
<resolution>

xml/issue4203.xml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4203" status="New">
5+
<title>constraints on `schedule_from`'s <i>`get-state`</i> function are incorrect</title>
6+
<section><sref ref="[exec.schedule.from]"/></section>
7+
<submitter>Eric Niebler</submitter>
8+
<date>03 Feb 2025</date>
9+
<priority>99</priority>
10+
11+
<discussion>
12+
<p>
13+
Imported from <a href="https://github.com/cplusplus/sender-receiver/issues/313">cplusplus/sender-receiver #313</a>.
14+
</p>
15+
<p>
16+
<sref ref="[exec.schedule.from]"/> p6 reads:
17+
18+
<blockquote>
19+
The member <code><i>impls-for</i>&lt;schedule_from_t&gt;::get-state</code>
20+
is initialized with a callable object equivalent to the following lambda:
21+
<pre><code>
22+
[]&lt;class Sndr, class Rcvr&gt;(Sndr&amp;&amp; sndr, Rcvr&amp; rcvr) noexcept(<i>see below</i>)
23+
requires sender_in&lt;<i>child-type</i>&lt;Sndr&gt;, env_of_t&lt;Rcvr&gt;&gt; {
24+
</code></pre>
25+
</blockquote>
26+
27+
The constraint should account for the fact that the child sender will
28+
be connected with <code><i>FWD-ENV</i>(get_env(rcvr))</code>.
29+
</p>
30+
31+
<note>The resolution touches the same text as LWG <iref ref="4198"/>.</note>
32+
33+
</discussion>
34+
35+
<resolution>
36+
<p>
37+
This wording is relative to <paper num="N5001"/>.
38+
</p>
39+
40+
<ol>
41+
<li>
42+
Change <sref ref="[exec.snd.expos]"/> as indicated:
43+
44+
<blockquote>
45+
-2-
46+
For a queryable object `env`,
47+
<code><i>FWD-ENV</i>(env)</code> is an expression whose
48+
type satisfies <i>`queryable`</i> such that for a query object `q`
49+
and a pack of subexpressions `as`,
50+
the expression <code><i>FWD-ENV</i>(env).query(q, as...)</code>
51+
is ill-formed if `forwarding_query(q)` is `false`;
52+
otherwise, it is expression-equivalent to `env.query(q, as...)`.
53+
<ins>
54+
The type <code><i>FWD-ENV-T</i>(Env)</code> is
55+
<code>decltype(<i>FWD-ENV</i>(declval&lt;Env&gt;()))</code>.
56+
</ins>
57+
</blockquote>
58+
</li>
59+
60+
<li>
61+
Change <sref ref="[exec.schedule.from]"/> as indicated:
62+
63+
<blockquote>
64+
-6-
65+
The member
66+
<code><i>impls-for</i>&lt;schedule_from_t&gt;::<i>get-state</i></code>
67+
is initialized with a callable object equivalent to the following lambda:
68+
<pre><code>
69+
[]&lt;class Sndr, class Rcvr&gt;(Sndr&amp;&amp; sndr, Rcvr&amp; rcvr) noexcept(<i>see below</i>)
70+
requires sender_in&lt;child-type&lt;Sndr&gt;, <ins><i>FWD-ENV-T</i>(</ins>env_of_t&lt;Rcvr&gt;<ins>)</ins>&gt; {
71+
</code></pre>
72+
<p>&hellip;</p>
73+
<p>
74+
-8-
75+
Let `Sigs` be a pack of the arguments to the `completion_signatures`
76+
specialization named by
77+
<code>completion_signatures_of_t&lt;child-type&lt;Sndr&gt;,
78+
<ins><i>FWD-ENV-T</i>(</ins>env_of_t&lt;Rcvr&gt;<ins>)</ins>&gt;</code>.
79+
Let <code><i>as-tuple</i></code>
80+
be an alias template that transforms a completion signature
81+
<code>Tag(Args...)</code> into the tuple specialization
82+
<code><i>decayed-tuple</i>&lt;Tag, Args...&gt;</code>.
83+
Then <code>variant_t</code> denotes the type
84+
<code>variant&lt;monostate, as-tuple&lt;Sigs&gt;...&gt;</code>,
85+
except with duplicate types removed.
86+
</p>
87+
</blockquote>
88+
</li>
89+
</ol>
90+
91+
</resolution>
92+
93+
</issue>

0 commit comments

Comments
 (0)