ThreadSchedule 4.1.0
Modern C++ thread management library
Loading...
Searching...
No Matches
threadschedule::unexpected< E > Class Template Reference

#include <expected.hpp>

Public Member Functions

 unexpected (unexpected const &)=default
 unexpected (unexpected &&)=default
auto operator= (unexpected const &) -> unexpected &=default
auto operator= (unexpected &&) -> unexpected &=default
template<typename G = E, std::enable_if_t<!std::is_same_v< detail::expected_remove_cvref_t< G >, unexpected > &&!std::is_same_v< detail::expected_remove_cvref_t< G >, std::in_place_t > &&std::is_constructible_v< E, G >, int > = 0>
constexpr unexpected (G &&error)
template<typename... Args, std::enable_if_t< std::is_constructible_v< E, Args... >, int > = 0>
constexpr unexpected (std::in_place_t, Args &&... args)
template<typename U, typename... Args, std::enable_if_t< std::is_constructible_v< E, std::initializer_list< U > &, Args... >, int > = 0>
constexpr unexpected (std::in_place_t, std::initializer_list< U > list, Args &&... args)
constexpr auto error () const &noexcept THREADSCHEDULE_LIFETIMEBOUND -> E const &
constexpr auto error () &noexcept THREADSCHEDULE_LIFETIMEBOUND -> E &
constexpr auto error () const &&noexcept THREADSCHEDULE_LIFETIMEBOUND -> E const &&
constexpr auto error () &&noexcept THREADSCHEDULE_LIFETIMEBOUND -> E &&
constexpr void swap (unexpected &other) noexcept(std::is_nothrow_swappable_v< E >)

Friends

template<typename G = E, std::enable_if_t< std::is_swappable_v< E >, G > * = nullptr>
constexpr void swap (unexpected &lhs, unexpected &rhs) noexcept(noexcept(lhs.swap(rhs)))
template<typename G>
constexpr auto operator== (unexpected const &lhs, unexpected< G > const &rhs) -> bool
template<typename G>
constexpr auto operator!= (unexpected const &lhs, unexpected< G > const &rhs) -> bool

Detailed Description

template<typename E>
class threadschedule::unexpected< E >

Definition at line 135 of file expected.hpp.

Constructor & Destructor Documentation

◆ unexpected() [1/5]

template<typename E>
threadschedule::unexpected< E >::unexpected ( unexpected< E > const & )
default

◆ unexpected() [2/5]

template<typename E>
threadschedule::unexpected< E >::unexpected ( unexpected< E > && )
default

References unexpected().

◆ unexpected() [3/5]

template<typename E>
template<typename G = E, std::enable_if_t<!std::is_same_v< detail::expected_remove_cvref_t< G >, unexpected > &&!std::is_same_v< detail::expected_remove_cvref_t< G >, std::in_place_t > &&std::is_constructible_v< E, G >, int > = 0>
threadschedule::unexpected< E >::unexpected ( G && error)
inlineexplicitconstexpr

Definition at line 149 of file expected.hpp.

References error().

◆ unexpected() [4/5]

template<typename E>
template<typename... Args, std::enable_if_t< std::is_constructible_v< E, Args... >, int > = 0>
threadschedule::unexpected< E >::unexpected ( std::in_place_t ,
Args &&... args )
inlineexplicitconstexpr

Definition at line 153 of file expected.hpp.

◆ unexpected() [5/5]

template<typename E>
template<typename U, typename... Args, std::enable_if_t< std::is_constructible_v< E, std::initializer_list< U > &, Args... >, int > = 0>
threadschedule::unexpected< E >::unexpected ( std::in_place_t ,
std::initializer_list< U > list,
Args &&... args )
inlineexplicitconstexpr

Definition at line 158 of file expected.hpp.

Member Function Documentation

◆ error() [1/4]

template<typename E>
auto threadschedule::unexpected< E >::error ( ) &&->E &&
inlineconstexprnoexcept

Definition at line 178 of file expected.hpp.

References THREADSCHEDULE_LIFETIMEBOUND.

◆ error() [2/4]

template<typename E>
auto threadschedule::unexpected< E >::error ( ) &->E &
inlineconstexprnoexcept

Definition at line 168 of file expected.hpp.

References THREADSCHEDULE_LIFETIMEBOUND.

◆ error() [3/4]

template<typename E>
auto threadschedule::unexpected< E >::error ( ) const &&->Econst &&
inlinenodiscardconstexprnoexcept

Definition at line 173 of file expected.hpp.

References THREADSCHEDULE_LIFETIMEBOUND.

◆ error() [4/4]

template<typename E>
auto threadschedule::unexpected< E >::error ( ) const &->Econst &
inlinenodiscardconstexprnoexcept

Definition at line 163 of file expected.hpp.

References THREADSCHEDULE_LIFETIMEBOUND.

Referenced by unexpected().

◆ operator=() [1/2]

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

References unexpected().

◆ operator=() [2/2]

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

References unexpected().

◆ swap()

template<typename E>
void threadschedule::unexpected< E >::swap ( unexpected< E > & other)
inlineconstexprnoexcept

Definition at line 184 of file expected.hpp.

References swap(), and unexpected().

Referenced by swap().

◆ operator!=

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

Definition at line 206 of file expected.hpp.

References unexpected().

◆ operator==

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

Definition at line 200 of file expected.hpp.

References unexpected().

◆ swap

template<typename E>
template<typename G = E, std::enable_if_t< std::is_swappable_v< E >, G > * = nullptr>
void swap ( unexpected< E > & lhs,
unexpected< E > & rhs )
friend

Definition at line 193 of file expected.hpp.

References unexpected().


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