@@ -7216,7 +7216,7 @@ namespace std::execution {
7216
7216
struct awaiter {
7217
7217
decltype(fn) <i> fn</i> ;
7218
7218
7219
- static bool await_ready() noexcept { return false; }
7219
+ static constexpr bool await_ready() noexcept { return false; }
7220
7220
void await_suspend(coroutine_handle<>) noexcept { <i> fn</i> (); }
7221
7221
[[noreturn]] void await_resume() noexcept { unreachable(); }
7222
7222
};
@@ -9578,19 +9578,21 @@ void finish();
9578
9578
namespace std::execution {
9579
9579
template<class Sndr, class Promise>
9580
9580
class <i> sender-awaitable</i> {
9581
- struct unit {};
9582
- using value_t = <i> single-sender-value-type</i> <Sndr, env_of_t<Promise>>;
9583
- using result_t = conditional_t<is_void_v<value_t>, unit, value_t>;
9584
- struct <i> awaitable-receiver</i> ;
9581
+ struct <i> unit</i> {}; <i> // exposition only</i>
9582
+ using <i> value-type</i> = <i> // exposition only</i>
9583
+ <i> single-sender-value-type</i> <Sndr, env_of_t<Promise>>;
9584
+ using <i> result-type</i> = <i> // exposition only</i>
9585
+ conditional_t<is_void_v<<i> value-type</i> >, <i> unit</i> , <i> value-type</i> >;
9586
+ struct <i> awaitable-receiver</i> ; <i> // exposition only</i>
9585
9587
9586
- variant<monostate, result_t , exception_ptr> <i> result</i> {};
9587
- connect_result_t<Sndr, <i> awaitable-receiver</i> > <i> state</i> ;
9588
+ variant<monostate, <i> result-type </i> , exception_ptr> <i> result</i> {}; <i> // exposition only </i>
9589
+ connect_result_t<Sndr, <i> awaitable-receiver</i> > <i> state</i> ; <i> // exposition only </i>
9588
9590
9589
9591
public:
9590
9592
<i> sender-awaitable</i> (Sndr&& sndr, Promise& p);
9591
- bool await_ready() const noexcept { return false; }
9593
+ static constexpr bool await_ready() noexcept { return false; }
9592
9594
void await_suspend(coroutine_handle<Promise>) noexcept { start(<i> state</i> ); }
9593
- value_t await_resume();
9595
+ <i> value-type </i> await_resume();
9594
9596
};
9595
9597
}
9596
9598
</pre>
@@ -9600,8 +9602,8 @@ void finish();
9600
9602
<pre highlight="c++">
9601
9603
struct <i> awaitable-receiver</i> {
9602
9604
using receiver_concept = receiver_t;
9603
- variant<monostate, result_t , exception_ptr>* <i> result-ptr</i> ;
9604
- coroutine_handle<Promise> <i> continuation</i> ;
9605
+ variant<monostate, <i> result-type </i> , exception_ptr>* <i> result-ptr</i> ; <i> // exposition only </i>
9606
+ coroutine_handle<Promise> <i> continuation</i> ; <i> // exposition only </i>
9605
9607
// ... <i> see below</i>
9606
9608
};
9607
9609
</pre>
@@ -9612,8 +9614,9 @@ void finish();
9612
9614
`Vs...`, and let `err` be an arbitrary expression of type `Err`.
9613
9615
Then:
9614
9616
9615
- 1. If `constructible_from<result_t, Vs...> ` is satisfied, the
9616
- expression `set_value(rcvr, vs...)` is equivalent to:
9617
+ 1. If <code> constructible_from<<i> result-type</i> , Vs...></code>
9618
+ is satisfied, the expression `set_value(rcvr, vs...)` is
9619
+ equivalent to:
9617
9620
9618
9621
<pre highlight="c++">
9619
9622
try {
@@ -9643,22 +9646,22 @@ void finish();
9643
9646
<code> tag(get_env(as_const(crcvr.<i> continuation</i> .promise())),
9644
9647
as...)</code> when that expression is well-formed.
9645
9648
9646
- 2. <b>< code><i> sender-awaitable</i> (Sndr&& sndr, Promise& p)</code></b >
9649
+ 2. <code><i> sender-awaitable</i> (Sndr&& sndr, Promise& p)</code>
9647
9650
9648
9651
- <i> Effects:</i> initializes <i> `state`</i> with
9649
9652
<code> connect(std::forward<Sndr>(sndr),
9650
9653
<i> awaitable-receiver</i> {&<i> result</i> ,
9651
9654
coroutine_handle<Promise>::from_promise(p)})</code> .
9652
9655
9653
- 3. <b> `value_t await_resume()` </b >
9656
+ 3. <code><i> value-type </i> await_resume()</code >
9654
9657
9655
9658
- <i> Effects:</i> equivalent to:
9656
9659
9657
9660
<pre highlight="c++">
9658
9661
if (<i> result</i> .index() == 2)
9659
9662
rethrow_exception(get<2>(<i> result</i> ));
9660
- if constexpr (!is_void_v<value_t >)
9661
- return std::forward<value_t >(get<1>(<i> result</i> ));
9663
+ if constexpr (!is_void_v<<i> value-type </i> >)
9664
+ return std::forward<<i> value-type </i> >(get<1>(<i> result</i> ));
9662
9665
</pre>
9663
9666
9664
9667
2. `as_awaitable` is a customization point object. For some subexpressions
0 commit comments