tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
unexpected< E > Struct Template Reference

#include <unexpected.hpp>

Public Member Functions

template<typename Err = E>
requires ( not etl::is_same_v<etl::remove_cvref_t<Err>, unexpected> // and not etl::is_same_v<etl::remove_cvref_t<Err>, etl::in_place_t> // and etl::is_constructible_v<E, Err> )
constexpr unexpected (Err &&e) noexcept(etl::is_nothrow_constructible_v< E, Err >)
 
template<typename... Args>
requires etl::is_constructible_v<E, Args...>
constexpr unexpected (etl::in_place_t, Args &&... args) noexcept(etl::is_nothrow_constructible_v< E, Args... >)
 
constexpr unexpected (unexpected &&)=default
 
constexpr unexpected (unexpected const &)=default
 
constexpr auto error () &&noexcept -> E &&
 
constexpr auto error () &noexcept -> E &
 
constexpr auto error () const &&noexcept -> E const &&
 
constexpr auto error () const &noexcept -> E const &
 
constexpr auto operator= (unexpected &&) -> unexpected &=default
 
constexpr auto operator= (unexpected const &) -> unexpected &=default
 
constexpr auto swap (unexpected &other) noexcept(etl::is_nothrow_swappable_v< E >) -> void
 

Friends

template<typename E2 >
constexpr auto operator== (unexpected const &lhs, unexpected< E2 > const &rhs) -> bool
 
constexpr auto swap (unexpected &x, unexpected &y) noexcept(noexcept(x.swap(y))) -> void
 

Constructor & Destructor Documentation

◆ unexpected() [1/4]

◆ unexpected() [2/4]

template<typename E >
template<typename... Args>
requires etl::is_constructible_v<E, Args...>
constexpr unexpected ( etl::in_place_t  ,
Args &&...  args 
)
inlineexplicitconstexprnoexcept

◆ unexpected() [3/4]

template<typename E >
constexpr unexpected ( unexpected< E > const )
constexprdefault

◆ unexpected() [4/4]

template<typename E >
constexpr unexpected ( unexpected< E > &&  )
constexprdefault

Member Function Documentation

◆ error() [1/4]

template<typename E >
constexpr auto error ( ) && -> E&&
inlineconstexprnoexcept

◆ error() [2/4]

template<typename E >
constexpr auto error ( ) & -> E&
inlineconstexprnoexcept

◆ error() [3/4]

template<typename E >
constexpr auto error ( ) const && -> E const&&
inlineconstexprnoexcept

◆ error() [4/4]

template<typename E >
constexpr auto error ( ) const & -> E const&
inlineconstexprnoexcept

◆ operator=() [1/2]

template<typename E >
constexpr auto operator= ( unexpected< E > &&  ) -> unexpected &=default
constexprdefault

◆ operator=() [2/2]

template<typename E >
constexpr auto operator= ( unexpected< E > const ) -> unexpected &=default
constexprdefault

◆ swap()

template<typename E >
constexpr auto swap ( unexpected< E > &  other) -> void
inlineconstexprnoexcept

Friends And Related Symbol Documentation

◆ operator==

template<typename E >
template<typename E2 >
constexpr auto operator== ( unexpected< E > const lhs,
unexpected< E2 > const rhs 
) -> bool
friend

◆ swap

template<typename E >
constexpr auto swap ( unexpected< E > &  x,
unexpected< E > &  y 
) -> void
friend

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