SimGrid
3.16
Versatile Simulation of Distributed Systems
|
A value or an exception (or nothing)
This is similar to optional<expected<T>>
` but it with a Future/Promise like API.
Also the name is not so great.
#include <future.hpp>
Public Member Functions | |
Result () | |
~Result () | |
Result (Result const &that) | |
Result & | operator= (Result const &that) |
Result (Result &&that) | |
Result & | operator= (Result &&that) |
bool | is_valid () const |
void | reset () |
void | set_exception (std::exception_ptr e) |
void | set_value (T &&value) |
void | set_value (T const &value) |
T | get () |
Extract the value from the future. More... | |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Extract the value from the future.
After this, the value is invalid.
T simgrid::xbt::Result< T >::value_ |
std::exception_ptr simgrid::xbt::Result< T >::exception_ |