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
Coroutine promise types are currently required to define an unhandled_exception member function. For many simple promise types, the definition of this function is simple and trivial; it just rethrows. It is unfortunate that authors of promise types are required to write this boilerplate. Many other coroutine extension points are only used if they exist, but this one is required. It would be nice if it was not required for noexcept coroutines.
Proposed change:
If the coroutine is noexcept, do not wrap the invocation of the function body in a try/catch block and do not require that promise types define an unhandled_exception method.
The text was updated successfully, but these errors were encountered:
jensmaurer
changed the title
US062 09.04.4 [dcl.fct.def.coroutine].5 Make unhandled_exception in promise types optional
US062 09.04.4 [dcl.fct.def.coroutine].5 Make unhandled_exception in promise types optional P2014
Jan 19, 2020
jfbastien
changed the title
US062 09.04.4 [dcl.fct.def.coroutine].5 Make unhandled_exception in promise types optional P2014
US062 09.04.4 [dcl.fct.def.coroutine].5 Make unhandled_exception in promise types optional P2100
Feb 11, 2020
Coroutine promise types are currently required to define an unhandled_exception member function. For many simple promise types, the definition of this function is simple and trivial; it just rethrows. It is unfortunate that authors of promise types are required to write this boilerplate. Many other coroutine extension points are only used if they exist, but this one is required. It would be nice if it was not required for noexcept coroutines.
Proposed change:
If the coroutine is noexcept, do not wrap the invocation of the function body in a try/catch block and do not require that promise types define an unhandled_exception method.
The text was updated successfully, but these errors were encountered: