File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 6763
6763
the \tcode {::operator new(size_t, nothrow_t)} form is used.
6764
6764
The allocation function used in this case shall have a non-throwing
6765
6765
\grammarterm {noexcept-specifier}.
6766
- If the allocation function returns \keyword {nullptr}, the coroutine returns
6766
+ If the allocation function returns \keyword {nullptr}, the coroutine transfers
6767
6767
control to the caller of the coroutine and the return value is obtained by a
6768
6768
call to \tcode {T::get_return_object_on_allocation_failure()}, where \tcode {T}
6769
6769
is the promise type.
Original file line number Diff line number Diff line change 4747
4747
The \keyword {co_await} expression is used to suspend evaluation of a
4748
4748
coroutine\iref {dcl.fct.def.coroutine } while awaiting completion of
4749
4749
the computation represented by the operand expression.
4750
+ Suspending the evaluation of a coroutine
4751
+ transfers control to its caller or resumer.
4750
4752
4751
4753
\begin {bnf }
4752
4754
\nontermdef {await-expression}\br
Original file line number Diff line number Diff line change 846
846
\indextext {function return|see{\tcode {return}}}%
847
847
848
848
\pnum
849
- A function returns to its caller by the \tcode {return} statement.
849
+ A function returns control to its caller by the \tcode {return} statement.
850
850
851
851
\pnum
852
852
The \grammarterm {expr-or-braced-init-list}
915
915
\end {bnf }
916
916
917
917
\pnum
918
- A coroutine returns to its caller or resumer \iref { dcl.fct.def.coroutine }
919
- by the \keyword {co_return} statement or when suspended \iref {expr.await }.
918
+ A \keyword {co_return} statement transfers control to
919
+ the caller or resumer of a coroutine \iref {dcl.fct.def.coroutine }.
920
920
A coroutine shall not enclose
921
921
a \tcode {return} statement\iref {stmt.return }.
922
922
\begin {note }
You can’t perform that action at this time.
0 commit comments