[dcl.fct.def.coroutine] The resumer of a coroutine may not be a function CWG2613 #5295
Labels
cwg
Issue must be reviewed by CWG.
not-editorial
Issue is not deemed editorial; the editorial issue is kept open for tracking.
#1
is a declaration where its initializer expression will invoke the resumption member function of the coroutine. We just state that:and we have specified that
Obviously, in this case, the call of the resumption member function at
#1
causes the coroutine to be resumed, and the co_return statement can cause the coroutine to return to its resumer, which means the lambda will be subsequently invoked. The complete example is here. The implementation admits that the context at#1
is also a so-called resumer.The text was updated successfully, but these errors were encountered: