Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Prev Up HomeNext

Returning Outcome types from Coroutines

eager<T, Executor = void> and lazy<T, Executor = void> and their atomic editions are completely standard awaitables with no special behaviours, except if T is a basic_result or basic_outcome. In that situation, the following occurs:

If the Coroutine throws a C++ exception which was not handled inside the Coroutine body, Outcome’s awaitable types try to convert it into a form which your Result or Outcome type being returned can transport. For example:

Last revised: March 18, 2022 at 14:45:32 UTC

Prev Up HomeNext