ThreadSchedule 3.0.0
Modern C++ thread management library
Loading...
Searching...
No Matches
threadschedule::expected< void, E > Class Template Reference

#include <expected.hpp>

Public Types

using value_type = void
 
using error_type = E
 
using unexpected_type = unexpected< E >
 

Public Member Functions

constexpr expected ()
 
 expected (expected const &)=default
 
 expected (expected &&)=default
 
auto operator= (expected const &) -> expected &=default
 
auto operator= (expected &&) -> expected &=default
 
 ~expected ()=default
 
template<typename... Args, std::enable_if_t< std::is_constructible_v< E, Args... >, int > = 0>
constexpr expected (unexpect_t, Args &&... args)
 
constexpr expected (unexpected< E > const &error)
 
constexpr expected (unexpected< E > &&error)
 
template<typename G , std::enable_if_t< std::is_constructible_v< E, G const & > &&std::is_assignable_v< E &, G const & > &&(std::is_nothrow_constructible_v< E, G const & >||std::is_nothrow_move_constructible_v< E >), int > = 0>
auto operator= (unexpected< G > const &error) -> expected &
 
template<typename G , std::enable_if_t< std::is_constructible_v< E, G > &&std::is_assignable_v< E &, G > &&(std::is_nothrow_constructible_v< E, G >||std::is_nothrow_move_constructible_v< E >), int > = 0>
auto operator= (unexpected< G > &&error) -> expected &
 
constexpr auto has_value () const noexcept -> bool
 
constexpr operator bool () const noexcept
 
void value () const
 
constexpr auto error () &noexcept -> E &
 
constexpr auto error () const &noexcept -> E const &
 
constexpr auto error () &&noexcept -> E &&
 
constexpr auto error () const &&noexcept -> E const &&
 
void emplace () noexcept
 
void swap (expected &other) noexcept(std::is_nothrow_move_constructible_v< E > &&std::is_nothrow_swappable_v< E >)
 
template<typename F >
auto and_then (F &&f) &
 
template<typename F >
auto and_then (F &&f) const &
 
template<typename F >
auto and_then (F &&f) &&
 
template<typename F >
auto and_then (F &&f) const &&
 
template<typename F >
auto or_else (F &&f) &
 
template<typename F >
auto or_else (F &&f) const &
 
template<typename F >
auto or_else (F &&f) &&
 
template<typename F >
auto or_else (F &&f) const &&
 
template<typename F >
auto transform (F &&f) &
 
template<typename F >
auto transform (F &&f) const &
 
template<typename F >
auto transform (F &&f) &&
 
template<typename F >
auto transform (F &&f) const &&
 
template<typename F >
auto transform_error (F &&f) &
 
template<typename F >
auto transform_error (F &&f) const &
 
template<typename F >
auto transform_error (F &&f) &&
 
template<typename F >
auto transform_error (F &&f) const &&
 

Friends

template<typename E2 >
auto operator== (expected const &lhs, expected< void, E2 > const &rhs) -> bool
 
template<typename E2 >
auto operator!= (expected const &lhs, expected< void, E2 > const &rhs) -> bool
 
template<typename E2 >
auto operator== (expected const &lhs, unexpected< E2 > const &rhs) -> bool
 
template<typename E2 >
auto operator== (unexpected< E2 > const &lhs, expected const &rhs) -> bool
 
template<typename E2 >
auto operator!= (expected const &lhs, unexpected< E2 > const &rhs) -> bool
 
template<typename E2 >
auto operator!= (unexpected< E2 > const &lhs, expected const &rhs) -> bool
 

Detailed Description

template<typename E>
class threadschedule::expected< void, E >

Definition at line 942 of file expected.hpp.

Member Typedef Documentation

◆ error_type

template<typename E >
using threadschedule::expected< void, E >::error_type = E

Definition at line 948 of file expected.hpp.

◆ unexpected_type

template<typename E >
using threadschedule::expected< void, E >::unexpected_type = unexpected<E>

Definition at line 949 of file expected.hpp.

◆ value_type

template<typename E >
using threadschedule::expected< void, E >::value_type = void

Definition at line 947 of file expected.hpp.

Constructor & Destructor Documentation

◆ expected() [1/6]

template<typename E >
constexpr threadschedule::expected< void, E >::expected ( )
inlineconstexpr

Definition at line 951 of file expected.hpp.

◆ expected() [2/6]

template<typename E >
threadschedule::expected< void, E >::expected ( expected< void, E > const &  )
default

◆ expected() [3/6]

template<typename E >
threadschedule::expected< void, E >::expected ( expected< void, E > &&  )
default

◆ ~expected()

template<typename E >
threadschedule::expected< void, E >::~expected ( )
default

◆ expected() [4/6]

template<typename E >
template<typename... Args, std::enable_if_t< std::is_constructible_v< E, Args... >, int > = 0>
constexpr threadschedule::expected< void, E >::expected ( unexpect_t  ,
Args &&...  args 
)
inlineexplicitconstexpr

Definition at line 959 of file expected.hpp.

◆ expected() [5/6]

template<typename E >
constexpr threadschedule::expected< void, E >::expected ( unexpected< E > const &  error)
inlineconstexpr

Definition at line 963 of file expected.hpp.

◆ expected() [6/6]

template<typename E >
constexpr threadschedule::expected< void, E >::expected ( unexpected< E > &&  error)
inlineconstexpr

Definition at line 964 of file expected.hpp.

Member Function Documentation

◆ and_then() [1/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::and_then ( F &&  f) &
inline

Definition at line 1036 of file expected.hpp.

◆ and_then() [2/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::and_then ( F &&  f) &&
inline

Definition at line 1048 of file expected.hpp.

◆ and_then() [3/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::and_then ( F &&  f) const &
inline

Definition at line 1042 of file expected.hpp.

◆ and_then() [4/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::and_then ( F &&  f) const &&
inline

Definition at line 1054 of file expected.hpp.

◆ emplace()

template<typename E >
void threadschedule::expected< void, E >::emplace ( )
inlinenoexcept

Definition at line 1024 of file expected.hpp.

◆ error() [1/4]

template<typename E >
constexpr auto threadschedule::expected< void, E >::error ( ) && -> E&&
inlineconstexprnoexcept

Definition at line 1014 of file expected.hpp.

References threadschedule::expected< T, E >::error().

◆ error() [2/4]

template<typename E >
constexpr auto threadschedule::expected< void, E >::error ( ) & -> E&
inlineconstexprnoexcept

Definition at line 1004 of file expected.hpp.

◆ error() [3/4]

template<typename E >
constexpr auto threadschedule::expected< void, E >::error ( ) const && -> E const&&
inlineconstexprnoexcept

Definition at line 1019 of file expected.hpp.

◆ error() [4/4]

template<typename E >
constexpr auto threadschedule::expected< void, E >::error ( ) const & -> E const&
inlineconstexprnoexcept

Definition at line 1009 of file expected.hpp.

◆ has_value()

template<typename E >
constexpr auto threadschedule::expected< void, E >::has_value ( ) const -> bool
inlineconstexprnoexcept

Definition at line 988 of file expected.hpp.

◆ operator bool()

template<typename E >
constexpr threadschedule::expected< void, E >::operator bool ( ) const
inlineexplicitconstexprnoexcept

Definition at line 993 of file expected.hpp.

References threadschedule::expected< T, E >::has_value().

◆ operator=() [1/4]

template<typename E >
auto threadschedule::expected< void, E >::operator= ( expected< void, E > &&  ) -> expected &=default
default

◆ operator=() [2/4]

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

◆ operator=() [3/4]

template<typename E >
template<typename G , std::enable_if_t< std::is_constructible_v< E, G > &&std::is_assignable_v< E &, G > &&(std::is_nothrow_constructible_v< E, G >||std::is_nothrow_move_constructible_v< E >), int > = 0>
auto threadschedule::expected< void, E >::operator= ( unexpected< G > &&  error) -> expected&
inline

Definition at line 981 of file expected.hpp.

References threadschedule::expected< T, E >::error().

◆ operator=() [4/4]

template<typename E >
template<typename G , std::enable_if_t< std::is_constructible_v< E, G const & > &&std::is_assignable_v< E &, G const & > &&(std::is_nothrow_constructible_v< E, G const & >||std::is_nothrow_move_constructible_v< E >), int > = 0>
auto threadschedule::expected< void, E >::operator= ( unexpected< G > const &  error) -> expected&
inline

Definition at line 971 of file expected.hpp.

References threadschedule::expected< T, E >::error().

◆ or_else() [1/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::or_else ( F &&  f) &
inline

Definition at line 1060 of file expected.hpp.

◆ or_else() [2/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::or_else ( F &&  f) &&
inline

Definition at line 1072 of file expected.hpp.

◆ or_else() [3/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::or_else ( F &&  f) const &
inline

Definition at line 1066 of file expected.hpp.

◆ or_else() [4/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::or_else ( F &&  f) const &&
inline

Definition at line 1078 of file expected.hpp.

◆ swap()

template<typename E >
void threadschedule::expected< void, E >::swap ( expected< void, E > &  other)
inlinenoexcept

Definition at line 1029 of file expected.hpp.

◆ transform() [1/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::transform ( F &&  f) &
inline

Definition at line 1084 of file expected.hpp.

◆ transform() [2/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::transform ( F &&  f) &&
inline

Definition at line 1096 of file expected.hpp.

◆ transform() [3/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::transform ( F &&  f) const &
inline

Definition at line 1090 of file expected.hpp.

◆ transform() [4/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::transform ( F &&  f) const &&
inline

Definition at line 1102 of file expected.hpp.

◆ transform_error() [1/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::transform_error ( F &&  f) &
inline

Definition at line 1108 of file expected.hpp.

◆ transform_error() [2/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::transform_error ( F &&  f) &&
inline

Definition at line 1120 of file expected.hpp.

◆ transform_error() [3/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::transform_error ( F &&  f) const &
inline

Definition at line 1114 of file expected.hpp.

◆ transform_error() [4/4]

template<typename E >
template<typename F >
auto threadschedule::expected< void, E >::transform_error ( F &&  f) const &&
inline

Definition at line 1126 of file expected.hpp.

◆ value()

template<typename E >
void threadschedule::expected< void, E >::value ( ) const
inline

Friends And Related Symbol Documentation

◆ operator!= [1/3]

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

Definition at line 1158 of file expected.hpp.

◆ operator!= [2/3]

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

Definition at line 1176 of file expected.hpp.

◆ operator!= [3/3]

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

Definition at line 1182 of file expected.hpp.

◆ operator== [1/3]

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

Definition at line 1150 of file expected.hpp.

◆ operator== [2/3]

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

Definition at line 1164 of file expected.hpp.

◆ operator== [3/3]

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

Definition at line 1170 of file expected.hpp.


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