Skip to content

Commit 1685da6

Browse files
committed
add some missing // exposition only annotations
1 parent 4b0eb02 commit 1685da6

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

execution.bs

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7216,7 +7216,7 @@ namespace std::execution {
72167216
struct awaiter {
72177217
decltype(fn) <i>fn</i>;
72187218

7219-
static bool await_ready() noexcept { return false; }
7219+
static constexpr bool await_ready() noexcept { return false; }
72207220
void await_suspend(coroutine_handle<>) noexcept { <i>fn</i>(); }
72217221
[[noreturn]] void await_resume() noexcept { unreachable(); }
72227222
};
@@ -9578,19 +9578,21 @@ void finish();
95789578
namespace std::execution {
95799579
template&lt;class Sndr, class Promise>
95809580
class <i>sender-awaitable</i> {
9581-
struct unit {};
9582-
using value_t = <i>single-sender-value-type</i>&lt;Sndr, env_of_t&lt;Promise>>;
9583-
using result_t = conditional_t&lt;is_void_v&lt;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>&lt;Sndr, env_of_t&lt;Promise>>;
9584+
using <i>result-type</i> = <i>// exposition only</i>
9585+
conditional_t&lt;is_void_v&lt;<i>value-type</i>>, <i>unit</i>, <i>value-type</i>>;
9586+
struct <i>awaitable-receiver</i>; <i>// exposition only</i>
95859587

9586-
variant&lt;monostate, result_t, exception_ptr> <i>result</i>{};
9587-
connect_result_t&lt;Sndr, <i>awaitable-receiver</i>> <i>state</i>;
9588+
variant&lt;monostate, <i>result-type</i>, exception_ptr> <i>result</i>{}; <i>// exposition only</i>
9589+
connect_result_t&lt;Sndr, <i>awaitable-receiver</i>> <i>state</i>; <i>// exposition only</i>
95889590

95899591
public:
95909592
<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; }
95929594
void await_suspend(coroutine_handle&lt;Promise>) noexcept { start(<i>state</i>); }
9593-
value_t await_resume();
9595+
<i>value-type</i> await_resume();
95949596
};
95959597
}
95969598
</pre>
@@ -9600,8 +9602,8 @@ void finish();
96009602
<pre highlight="c++">
96019603
struct <i>awaitable-receiver</i> {
96029604
using receiver_concept = receiver_t;
9603-
variant&lt;monostate, result_t, exception_ptr>* <i>result-ptr</i>;
9604-
coroutine_handle&lt;Promise> <i>continuation</i>;
9605+
variant&lt;monostate, <i>result-type</i>, exception_ptr>* <i>result-ptr</i>; <i>// exposition only</i>
9606+
coroutine_handle&lt;Promise> <i>continuation</i>; <i>// exposition only</i>
96059607
// ... <i>see below</i>
96069608
};
96079609
</pre>
@@ -9612,8 +9614,9 @@ void finish();
96129614
`Vs...`, and let `err` be an arbitrary expression of type `Err`.
96139615
Then:
96149616

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&lt;<i>result-type</i>, Vs...></code>
9618+
is satisfied, the expression `set_value(rcvr, vs...)` is
9619+
equivalent to:
96179620

96189621
<pre highlight="c++">
96199622
try {
@@ -9643,22 +9646,22 @@ void finish();
96439646
<code>tag(get_env(as_const(crcvr.<i>continuation</i>.promise())),
96449647
as...)</code> when that expression is well-formed.
96459648

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>
96479650

96489651
- <i>Effects:</i> initializes <i>`state`</i> with
96499652
<code>connect(std::forward&lt;Sndr>(sndr),
96509653
<i>awaitable-receiver</i>{&<i>result</i>,
96519654
coroutine_handle&lt;Promise>::from_promise(p)})</code>.
96529655

9653-
3. <b>`value_t await_resume()`</b>
9656+
3. <code><i>value-type</i> await_resume()</code>
96549657

96559658
- <i>Effects:</i> equivalent to:
96569659

96579660
<pre highlight="c++">
96589661
if (<i>result</i>.index() == 2)
96599662
rethrow_exception(get&lt;2>(<i>result</i>));
9660-
if constexpr (!is_void_v&lt;value_t>)
9661-
return std::forward&lt;value_t>(get&lt;1>(<i>result</i>));
9663+
if constexpr (!is_void_v&lt;<i>value-type</i>>)
9664+
return std::forward&lt;<i>value-type</i>>(get&lt;1>(<i>result</i>));
96629665
</pre>
96639666

96649667
2. `as_awaitable` is a customization point object. For some subexpressions

0 commit comments

Comments
 (0)