Skip to content

Commit 714a854

Browse files
committed
Add P/R to 4202
1 parent ebfe55e commit 714a854

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

xml/issue4202.xml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
<discussion>
1212
<p>
13-
Imported from <a href="https://github.com/cplusplus/sender-receiver/issues/305">cplusplus/sender-receiver #305</a>.
13+
Imported from
14+
<a href="https://github.com/cplusplus/sender-receiver/issues/305">cplusplus/sender-receiver #305</a> and
15+
<a href="https://github.com/cplusplus/sender-receiver/issues/306">cplusplus/sender-receiver #306</a>.
1416
</p>
1517
<p>
1618
We require an opt-in to satisfy the `sender` concept.
@@ -29,7 +31,54 @@ We should roll back that change.
2931

3032
<resolution>
3133
<p>
34+
This wording is relative to <paper num="N5001"/>.
3235
</p>
36+
37+
<ol>
38+
<li>
39+
Change <sref ref="[exec.snd.concepts]"/> as indicated:
40+
<blockquote>
41+
<pre><code>
42+
template&lt;class Sndr&gt;
43+
concept <i>is-sender</i> = <i>// exposition only</i>
44+
derived_from&lt;typename Sndr::sender_concept, sender_t&gt;;
45+
46+
template&lt;class Sndr&gt;
47+
concept <i>enable-sender</i> = <i>// exposition only</i>
48+
<i>is-sender</i>&lt;Sndr&gt; ||
49+
<i>is-awaitable</i>&lt;Sndr, <i>env-promise</i>&lt;empty_env&gt;&gt;; <i>// [exec.awaitable]</i>
50+
<ins>
51+
template&lt;class Sndr&gt;
52+
inline constexpr bool enable_sender = <i>enable-sender</i>&lt;Sndr&gt;;
53+
</ins>
54+
template&lt;class Sndr&gt;
55+
concept sender =
56+
<del>bool(<i>enable-sender</i></del><ins>enable_sender</ins>&lt;remove_cvref_t&lt;Sndr&gt;&gt;<del>)</del> &amp;&amp;
57+
requires (const remove_cvref_t&lt;Sndr&gt;&amp; sndr) {
58+
{ get_env(sndr) } -&gt; &lt;i&gt;queryable&lt;/i&gt;;
59+
} &amp;&amp;
60+
move_constructible&lt;remove_cvref_t&lt;Sndr&gt;&gt; &amp;&amp;
61+
constructible_from&lt;remove_cvref_t&lt;Sndr&gt;, Sndr&gt;;
62+
</code></pre>
63+
<p>&hellip;</p>
64+
<p>
65+
-2-
66+
Given a subexpression `sndr`, [&hellip;]
67+
</p>
68+
<p>
69+
<ins>
70+
-?-
71+
<i>Remarks</i>:
72+
Pursuant to <sref ref="[namespace.std]"/>, users may specialize
73+
`enable_sender` to `true` for cv-unqualified program-defined types that model
74+
`sender`, and `false` for types that do not.
75+
Such specializations shall be usable in constant expressions
76+
(<sref ref="[expr.const]"/>) and have type `const bool`.
77+
</ins>
78+
</p>
79+
</blockquote>
80+
</li>
81+
</ol>
3382
</resolution>
3483

3584
</issue>

0 commit comments

Comments
 (0)