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 >
1618We 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< class Sndr>
43+ concept <i >is-sender</i > = <i >// exposition only</i >
44+ derived_from< typename Sndr::sender_concept, sender_t> ;
45+
46+ template< class Sndr>
47+ concept <i >enable-sender</i > = <i >// exposition only</i >
48+ <i >is-sender</i >< Sndr> ||
49+ <i >is-awaitable</i >< Sndr, <i >env-promise</i >< empty_env>> ; <i >// [exec.awaitable]</i >
50+ <ins >
51+ template< class Sndr>
52+ inline constexpr bool enable_sender = <i >enable-sender</i >< Sndr> ;
53+ </ins >
54+ template< class Sndr>
55+ concept sender =
56+ <del >bool(<i >enable-sender</i ></del ><ins >enable_sender</ins >< remove_cvref_t< Sndr>> <del >)</del > &&
57+ requires (const remove_cvref_t< Sndr>& sndr) {
58+ { get_env(sndr) } -> < i> queryable< /i> ;
59+ } &&
60+ move_constructible< remove_cvref_t< Sndr>> &&
61+ constructible_from< remove_cvref_t< Sndr> , Sndr> ;
62+ </code ></pre >
63+ <p >… </p >
64+ <p >
65+ -2-
66+ Given a subexpression `sndr`, [… ]
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