Skip to content

US062 09.04.4 [dcl.fct.def.coroutine].5 Make unhandled_exception in promise types optional P2100 #61

@wg21bot

Description

@wg21bot

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions