Variadic Futures
|
Landing for a value that finishes a Future. More...
#include <future.h>
Public Types | |
using | future_type = Basic_future< Alloc, Ts... > |
using | storage_type = typename future_type::storage_type |
using | value_type = detail::future_value_type_t< Ts... > |
using | fullfill_type = detail::fullfill_type_t< Ts... > |
using | finish_type = detail::finish_type_t< Ts... > |
using | fail_type = detail::fail_type_t< Ts... > |
Public Member Functions | |
Basic_promise (const Alloc &alloc=Alloc()) | |
Basic_promise (Basic_promise &&)=default | |
Basic_promise & | operator= (Basic_promise &&)=default |
future_type | get_future () |
Get the future object. More... | |
template<typename... Us> | |
void | set_value (Us &&... values) |
Fullfills the promise. More... | |
template<typename... Us> | |
void | finish (Us &&... expecteds) |
Finishes the promise. More... | |
void | set_exception (fail_type error) |
Fails the promise. More... | |
operator bool () const | |
returns wether the promise still refers to an uncompleted future More... | |
Landing for a value that finishes a Future.
Ts |
void aom::Basic_promise< Alloc, Ts >::finish | ( | Us &&... | expecteds | ) |
Finishes the promise.
Us |
expecteds |
future_type aom::Basic_promise< Alloc, Ts >::get_future | ( | ) |
Get the future object.
alloc | The allocator to use when creating the interal state |
aom::Basic_promise< Alloc, Ts >::operator bool | ( | ) | const |
returns wether the promise still refers to an uncompleted future
void aom::Basic_promise< Alloc, Ts >::set_exception | ( | fail_type | error | ) |
Fails the promise.
error |
void aom::Basic_promise< Alloc, Ts >::set_value | ( | Us &&... | values | ) |
Fullfills the promise.
Us |
values |