Embedded Template Library 1.0
etl::expected< void, TError > Class Template Reference

Specialisation for void value type. More...

#include <expected.h>

Public Types

typedef etl::expected< void, TError > this_type
 
typedef void value_type
 
typedef TError error_type
 
typedef etl::unexpected< TError > unexpected_type
 

Public Member Functions

ETL_CONSTEXPR14 expected ()
 Default constructor.
 
ETL_CONSTEXPR14 expected (const unexpected_type &ue_)
 Copy construct from unexpected.
 
ETL_CONSTEXPR14 expected (const this_type &other)
 Copy construct.
 
this_typeoperator= (const this_type &other)
 Copy assign.
 
expectedoperator= (const unexpected_type &ue)
 Copy assign from unexpected.
 
ETL_NODISCARD ETL_CONSTEXPR14 bool has_value () const
 Returns true if expected has a value.
 
ETL_NODISCARD ETL_CONSTEXPR14 operator bool () const
 Returns true if expected has a value.
 
error_type & error () const
 

Detailed Description

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

Specialisation for void value type.

Member Function Documentation

◆ error()

template<typename TError >
error_type & etl::expected< void, TError >::error ( ) const
inline

Returns the error Undefined behaviour if an error has not been set.


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