Boost C++ Libraries

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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
Prev Up HomeNext

Returning Outcome types from Coroutines

eager<T> and lazy<T> 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: April 07, 2020 at 10:22:38 +0100


Prev Up HomeNext