@@ -101,11 +101,76 @@ Set priority to 1 after reflector poll.
101101Direction seems right. Decay-copyable is not a defined term.
102102</p >
103103
104+ <note >2025-02-12 Tim adds PR</note >
105+ <p >This also corrects the issue that `nothrow` is currently relying
106+ on the unspecified exception specification of `tuple`'s constructor.</p >
104107</discussion >
105108
106109<resolution >
107110<p >
111+ This wording is relative to <paper num =" N5001" />.
108112</p >
113+
114+ <ol >
115+ <li >
116+ Modify <sref ref =" [exec.schedule.from]" /> p8 as indicated:
117+ <blockquote >
118+ <p >
119+ -8- Let `Sigs` be a pack of the arguments to the `completion_signatures`
120+ specialization named by
121+ <code >completion_signatures_of_t< <i >child-type</i >< Sndr> , env_of_t< Rcvr>> </code >.
122+ Let <i ><code >as-tuple</code ></i > be an alias template
123+ <del >
124+ that transforms a completion signature `Tag(Args...)` into
125+ the tuple specialization <code ><i >decayed-tuple</i >< Tag, Args...> </code >.
126+ </del >
127+ <ins >
128+ such that <code ><i >as-tuple</i >< Tag(Args...)> </code > denotes
129+ the type <code ><i >decayed-tuple</i >< Tag, Args...> </code >,
130+ and let <code ><i >is-nothrow-decay-copy-sig</i ></code >
131+ be a variable template such that
132+ <code >auto(<i >is-nothrow-decay-copy-sig</i >< Tag(Args...)> )</code >
133+ is a constant expression of type `bool` and equal to
134+ <code >(is_nothrow_constructible_v< decay_t< Args> , Args> && ...)</code >.
135+ Let <i ><code >error-completion</code ></i > be a pack consisting of the type
136+ `set_error_t(exception_ptr)` if
137+ <code >(<i >is-nothrow-decay-copy-sig</i >< Sigs> && ...)</code >
138+ is `false`, and an empty pack otherwise.
139+ </ins >
140+ Then `variant_t` denotes the type
141+ <code >variant< monostate, <i >as-tuple</i >< Sigs> ...<ins >, <i >error-completion</i >...</ins >> </code >,
142+ except with duplicate types removed.
143+ </p >
144+ </blockquote >
145+ </li >
146+ <li >
147+ <p >Modify <sref ref =" [exec.schedule.from]" /> p11 as indicated:</p >
148+ <blockquote ><p >
149+ -11- The member <code ><i >impls-for</i >< schedule_from_t> ::<i >complete</i ></code >
150+ is initialized with a callable object equivalent to the following lambda:
151+ </p >
152+ <blockquote ><pre ><code >
153+ []< class Tag, class... Args> (auto, auto& state, auto& rcvr, Tag, Args&& ... args) noexcept
154+ -> void {
155+ using result_t = <i >decayed-tuple</i >< Tag, Args...> ;
156+ constexpr bool nothrow = <del >is_nothrow_constructible_v< result_t, Tag, Args...> </del >
157+ <ins >(is_nothrow_constructible_v< decay_t< Args> , Args> && ...)</ins >;
158+
159+ try {
160+ state.<i >async-result</i >.template emplace< result_t> (Tag(), std::forward< Args> (args)...);
161+ } catch (...) {
162+ if constexpr (!nothrow) <del >{</del >
163+ <ins >state.<i >async-result</i >.template emplace< tuple< set_error_t, exception_ptr>> (set_error, current_exception());</ins >
164+ <del >set_error(std::move(rcvr), current_exception());</del >
165+ <del >return;</del >
166+ <del >}</del >
167+ }
168+ start(state.<i >op-state</i >);
169+ };
170+ </code ></pre ></blockquote >
171+ </blockquote >
172+ </li >
173+ </ol >
109174</resolution >
110175
111176</issue >
0 commit comments