You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If p.return_void() is a valid expression, flowing off the end of a coroutine's function-body is equivalent to a co_return with no operand; otherwise flowing off the end of a coroutine's function-body results in undefined behavior.
which the bolded function-bodys refer to? Since [dcl.fct.def.coroutine] p5 states that
A coroutine behaves as if its function-body were replaced by...
If we argue that the replace function-body is just notional(i.e., the replacement process is not actually happened), I would say the expound in [dcl.fct.def.coroutine] p11 is anyway based on the replaced one.
The coroutine state is destroyed when control flows off the end of the coroutine or the destroy member function ([coroutine.handle.resumption]) of a coroutine handle ([coroutine.handle]) that refers to the coroutine is invoked.
Presumably, the end of the coroutine refers to the portion after co_await promise.final_suspend() ; in the replaced one. Maybe, there is room for improvement for the above provision in order to eliminate the ambiguity.
The text was updated successfully, but these errors were encountered:
[stmt.return.coroutine] p3 states:
which the bolded
function-body
s refer to? Since [dcl.fct.def.coroutine] p5 states thatIf we argue that the replace function-body is just notional(i.e., the replacement process is not actually happened), I would say the expound in [dcl.fct.def.coroutine] p11 is anyway based on the replaced one.
Presumably, the end of the coroutine refers to the portion after
co_await promise.final_suspend() ;
in the replaced one. Maybe, there is room for improvement for the above provision in order to eliminate the ambiguity.The text was updated successfully, but these errors were encountered: