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
The note in [dcl.fct.def.coroutine]/6 suggests that the existence of promise::return_void causes flowing off the end of a coroutine to be well-defined. [stmt.return.coroutine]/3, however, actually checks whether calling it with no arguments is a valid expression (presumably from the coroutine). As such, a return_void that is inaccessible, deleted, or requires arguments will produce undefined behavior even though the implementation knows that return_void was "intended" (since no return_value can coexist with it). This seems unnecessarily user-hostile.
Suggested resolution
Say in [stmt.return.coroutine]/3 that p.return_void() is used if name lookup succeeded even if it's ill-formed.