folly::expected_detail::PromiseReturnsValue

Coroutine promise for coroutines that produce a value.

Synopsis

Declared in <folly/Expected.h>

template<
    typename Value,
    typename Error>
struct PromiseReturnsValue
    : PromiseBase<Value, Error>

Base Classes

NameDescription
PromiseBase<Value, Error>Shared base of the Expected coroutine promise types.

Member Functions

NameDescription
operator= [deleted]Deleted copy assignment operator.
final_suspend Reports the final suspension behavior.
get_return_object Creates the coroutine return object.
initial_suspend Reports the initial suspension behavior.
return_value Stores the value produced by a co_return expression.
unhandled_exception [noreturn]Handles an exception escaping the coroutine body by rethrowing.

Data Members

NameDescription
value_ Points at the result storage.