Embedded Template Library 1.0
|
Expected type. More...
#include <expected.h>
Public Types | |
typedef etl::expected< TValue, TError > | this_type |
typedef TValue | value_type |
typedef TError | error_type |
typedef etl::unexpected< TError > | unexpected_type |
Public Member Functions | |
ETL_CONSTEXPR14 | expected () ETL_NOEXCEPT |
Default constructor. | |
ETL_CONSTEXPR14 | expected (const value_type &value_) ETL_NOEXCEPT |
Constructor. | |
ETL_CONSTEXPR14 | expected (const expected &other) ETL_NOEXCEPT |
Copy constructor. | |
template<typename G > | |
expected (const etl::unexpected< G > &ue) | |
ETL_CONSTEXPR14 | expected (etl::in_place_t) ETL_NOEXCEPT |
Construct with default value type. | |
this_type & | operator= (const this_type &other) |
expected & | operator= (const value_type &value) |
Copy assign from value. | |
expected & | operator= (const unexpected_type &ue) |
Copy assign from unexpected. | |
value_type & | value () const |
Get the value. | |
ETL_NODISCARD ETL_CONSTEXPR14 bool | has_value () const |
ETL_NODISCARD ETL_CONSTEXPR14 | operator bool () const |
template<typename U > | |
value_type | value_or (const U &default_value) const |
error_type & | error () const |
value_type * | operator-> () |
const value_type * | operator-> () const |
value_type & | operator* () ETL_LVALUE_REF_QUALIFIER |
const value_type & | operator* () const ETL_LVALUE_REF_QUALIFIER |
Expected type.