6
6
<section ><sref ref =" [exec.let]" /></section >
7
7
<submitter >Eric Niebler</submitter >
8
8
<date >03 Feb 2025</date >
9
- <priority >99 </priority >
9
+ <priority >1 </priority >
10
10
11
11
<discussion >
12
12
<p >
@@ -30,6 +30,12 @@ Paragraphs 8, 9, and 10 only make sense in relation to the lambda in paragraph 7
30
30
but that is not at all clear from the current wording.
31
31
I suggest making paragraphs 8, 9, and 10 sub-bullets of paragraph 7.
32
32
</p >
33
+
34
+ <note >2025-02-07; Reflector poll</note >
35
+ <p >
36
+ Set priority to 1 after reflector poll.
37
+ </p >
38
+
33
39
</discussion >
34
40
35
41
<resolution >
@@ -42,6 +48,44 @@ Change <sref ref="[exec.let]"/> as indicated,
42
48
and nest paragraphs 8, 9, and 10 below paragraph 7:
43
49
44
50
<blockquote >
51
+ <p >
52
+ -7-
53
+ <code ><i >impls-for</i >< <i >decayed-typeof</i >< <i >let-cpo</i >>> ::<i >get-state</i ></code >
54
+ is initialized with a callable object equivalent to the following:
55
+ <pre ><code >
56
+ []< class Sndr, class Rcvr> (Sndr&& sndr, Rcvr& rcvr) requires <i >see below</i > {
57
+ auto& [_, fn, child] = sndr;
58
+ using fn_t = decay_t< decltype(fn)> ;
59
+ using env_t = decltype(<i >let-env</i >(child));
60
+ using args_variant_t = <i >see below</i >;
61
+ using ops2_variant_t = <i >see below</i >;
62
+
63
+ struct state-type {
64
+ fn_t fn; <i >// exposition only</i >
65
+ env_t env; <i >// exposition only</i >
66
+ args_variant_t args; <i >// exposition only</i >
67
+ ops2_variant_t ops2; <i >// exposition only</i >
68
+ };
69
+ return <i >state-type</i >{std::forward_like< Sndr> (fn), <i >let-env</i >(child), {}, {}};
70
+ }
71
+ </code ></pre >
72
+ </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< <i >child-type</i >< Sndr> ,
78
+ env_of_t< Rcvr>> </code >.
79
+ Let `LetSigs` be a pack of those types in `Sigs` with a return type of
80
+ <code ><i >decayed-typeof</i >< <i >set-cpo</i >> </code >.
81
+ Let `as-tuple` be an alias template such that
82
+ <code ><i >as-tuple</i >< Tag(Args...)> </code >
83
+ denotes the type <code ><i >decayed-tuple</i >< Args...> </code >.
84
+ Then `args_variant_t` denotes the type
85
+ <code >variant< monostate, <i >as-tuple</i >< LetSigs> ...> </code >
86
+ except with duplicate types removed.
87
+ </p >
88
+ <p >
45
89
-9-
46
90
Given a type `Tag` and a pack `Args`, let <code ><i >as-sndr2</i ></code >
47
91
be an alias template such that
@@ -52,6 +96,12 @@ Then `ops2_variant_t` denotes the type
52
96
<pre ><code > variant< monostate, connect_result_t< <i >as-sndr2</i >< LetSigs> , receiver2< Rcvr, <del >Env</del ><ins >env_t</ins >>> ...>
53
97
</code ></pre >
54
98
except with duplicate types removed.
99
+ </p >
100
+ <p >
101
+ -10-
102
+ The <i >requires-clause</i > constraining the above lambda is satisfied
103
+ if and only if the types `args_variant_t` and `ops2_variant_t` are well-formed.
104
+ </p >
55
105
</blockquote >
56
106
57
107
</li >
0 commit comments