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)
 
template<typename... Args>
requires etl::is_constructible_v<E, Args...>
constexpr unexpected (etl::in_place_t, Args &&... 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 requires(etl::is_swappable_v< E >)
 

Constructor & Destructor Documentation

◆ unexpected() [1/4]

template<typename E>
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>)
unexpected ( Err && e)
inlineexplicitconstexpr

◆ unexpected() [2/4]

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

◆ unexpected() [3/4]

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

◆ unexpected() [4/4]

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

Member Function Documentation

◆ error() [1/4]

template<typename E>
auto error ( ) && -> E&&
inlinenodiscardconstexprnoexcept

◆ error() [2/4]

template<typename E>
auto error ( ) & -> E&
inlinenodiscardconstexprnoexcept

◆ error() [3/4]

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

◆ error() [4/4]

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ swap()

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

Friends And Related Symbol Documentation

◆ operator==

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

◆ swap

template<typename E>
auto swap ( unexpected< E > & x,
unexpected< E > & y ) -> void requires(etl::is_swappable_v<E>)
friend

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