plugify 1.2.8
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
plg::unexpected< E > Class Template Reference

Public Types

using value_type = E
 

Public Member Functions

constexpr unexpected (unexpected const &)=default
 
constexpr unexpected (unexpected &&)=default
 
constexpr auto operator= (unexpected const &) -> unexpected &=default
 
constexpr auto operator= (unexpected &&) -> unexpected &=default
 
template<class... Args>
requires std::constructible_from<E, Args...>
constexpr unexpected (std::in_place_t, Args &&... args)
 
template<class U , class... Args>
requires std::constructible_from<E, std::initializer_list<U>&, Args...>
constexpr unexpected (std::in_place_t, std::initializer_list< U > i_list, Args &&... args)
 
template<class Err = E>
requires (!std::same_as<std::remove_cvref_t<Err>, unexpected>) && (!std::same_as<std::remove_cvref_t<Err>, std::in_place_t>) && std::constructible_from<E, Err>
constexpr unexpected (Err &&err)
 
constexpr auto value () const &noexcept -> E const &
 
constexpr auto value () &noexcept -> E &
 
constexpr auto value () const &&noexcept -> E const &&
 
constexpr auto value () &&noexcept -> E &&
 
constexpr void swap (unexpected &other) noexcept(std::is_nothrow_swappable_v< E >)
 

Friends

template<class E2 >
requires (requires(E const& x, E2 const& y) { { x == y } -> std::convertible_to<bool>; })
constexpr auto operator== (unexpected const &x, unexpected< E2 > const &y) -> bool
 
constexpr void swap (unexpected &x, unexpected &y) noexcept(noexcept(x.swap(y)))
 

Detailed Description

template<class E>
class plg::unexpected< E >

Definition at line 29 of file expected.hpp.

Member Typedef Documentation

◆ value_type

template<class E >
using plg::unexpected< E >::value_type = E

Definition at line 31 of file expected.hpp.

Constructor & Destructor Documentation

◆ unexpected() [1/3]

template<class E >
template<class... Args>
requires std::constructible_from<E, Args...>
constexpr plg::unexpected< E >::unexpected ( std::in_place_t  ,
Args &&...  args 
)
inlineexplicitconstexpr

Definition at line 40 of file expected.hpp.

◆ unexpected() [2/3]

template<class E >
template<class U , class... Args>
requires std::constructible_from<E, std::initializer_list<U>&, Args...>
constexpr plg::unexpected< E >::unexpected ( std::in_place_t  ,
std::initializer_list< U i_list,
Args &&...  args 
)
inlineexplicitconstexpr

Definition at line 45 of file expected.hpp.

◆ unexpected() [3/3]

template<class E >
template<class Err = E>
requires (!std::same_as<std::remove_cvref_t<Err>, unexpected>) && (!std::same_as<std::remove_cvref_t<Err>, std::in_place_t>) && std::constructible_from<E, Err>
constexpr plg::unexpected< E >::unexpected ( Err &&  err)
inlineexplicitconstexpr

Definition at line 54 of file expected.hpp.

Member Function Documentation

◆ swap()

template<class E >
constexpr void plg::unexpected< E >::swap ( unexpected< E > &  other)
inlineconstexprnoexcept

Definition at line 64 of file expected.hpp.

◆ value() [1/4]

template<class E >
constexpr auto plg::unexpected< E >::value ( ) && -> E&&
inlineconstexprnoexcept

Definition at line 62 of file expected.hpp.

◆ value() [2/4]

template<class E >
constexpr auto plg::unexpected< E >::value ( ) & -> E&
inlineconstexprnoexcept

Definition at line 58 of file expected.hpp.

◆ value() [3/4]

template<class E >
constexpr auto plg::unexpected< E >::value ( ) const && -> E const&&
inlineconstexprnoexcept

Definition at line 59 of file expected.hpp.

◆ value() [4/4]

template<class E >
constexpr auto plg::unexpected< E >::value ( ) const & -> E const&
inlineconstexprnoexcept

Definition at line 57 of file expected.hpp.

Friends And Related Symbol Documentation

◆ operator==

template<class E >
template<class E2 >
requires (requires(E const& x, E2 const& y) { { x == y } -> std::convertible_to<bool>; })
constexpr auto operator== ( unexpected< E > const x,
unexpected< E2 > const y 
) -> bool
friend

Definition at line 76 of file expected.hpp.

◆ swap

template<class E >
constexpr void swap ( unexpected< E > &  x,
unexpected< E > &  y 
)
friend

Definition at line 80 of file expected.hpp.


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