Embedded Template Library 1.0
Loading...
Searching...
No Matches
etl::expected< TValue, TError > Class Template Reference

Expected type. More...

#include <expected.h>

Public Types

typedef etl::expected< TValue, TErrorthis_type
 
typedef TValue value_type
 
typedef TError error_type
 
typedef etl::unexpected< TErrorunexpected_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_typeoperator= (const this_type &other)
 Copy assign from etl::expected.
 
expectedoperator= (const value_type &value)
 Copy assign from value.
 
expectedoperator= (const unexpected_type &ue)
 Copy assign from unexpected.
 
value_typevalue () 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_typeerror () const
 
value_typeoperator-> ()
 
const value_typeoperator-> () const
 
value_typeoperator* () ETL_LVALUE_REF_QUALIFIER
 
const value_typeoperator* () const ETL_LVALUE_REF_QUALIFIER
 

Detailed Description

template<typename TValue, typename TError>
class etl::expected< TValue, TError >

Expected type.


The documentation for this class was generated from the following file: