8 Statements [stmt.stmt]

8.6 Jump statements [stmt.jump]

8.6.4 The co_­return statement [stmt.return.coroutine]

coroutine-return-statement:
	co_return expr-or-braced-init-list ;
A coroutine returns to its caller or resumer ([dcl.fct.def.coroutine]) by the co_­return statement or when suspended ([expr.await]).
A coroutine shall not return to its caller or resumer by a return statement ([stmt.return]).
The expr-or-braced-init-list of a co_­return statement is called its operand.
Let p be an lvalue naming the coroutine promise object ([dcl.fct.def.coroutine]).
A co_­return statement is equivalent to:
{ S; goto final-suspend; }
where final-suspend is the exposition-only label defined in [dcl.fct.def.coroutine] and S is defined as follows:
S shall be a prvalue of type void.
If p.return_­void() is a valid expression, flowing off the end of a coroutine is equivalent to a co_­return with no operand; otherwise flowing off the end of a coroutine results in undefined behavior.