MySQL 8.0.40
Source Code Documentation
stdx::expected< T, E > Class Template Reference

#include <expected.h>

Inheritance diagram for stdx::expected< T, E >:
[legend]

Public Member Functions

template<class Func >
constexpr auto and_then (Func &&func) &
 
template<class Func >
constexpr auto and_then (Func &&func) &&
 
template<class Func >
constexpr auto and_then (Func &&func) const &
 
template<class Func >
constexpr auto and_then (Func &&func) const &&
 
template<class Func >
constexpr auto or_else (Func &&func) &
 
template<class Func >
constexpr auto or_else (Func &&func) &&
 
template<class Func >
constexpr auto or_else (Func &&func) const &
 
template<class Func >
constexpr auto or_else (Func &&func) const &&
 
template<class Func >
constexpr auto transform (Func &&func) &
 
template<class Func >
constexpr auto transform (Func &&func) &&
 
template<class Func >
constexpr auto transform (Func &&func) const &
 
template<class Func >
constexpr auto transform (Func &&func) const &&
 
- Public Member Functions inherited from stdx::ExpectedImpl< T, E >
template<bool B = std::is_default_constructible<T>::value, std::enable_if_t< B > * = nullptr>
constexpr ExpectedImpl ()
 
template<class U , class G , class UF = const U &, class GF = const G &, std::enable_if_t< can_value_convert_construct< U, G, UF, GF >::value &&!constructor_is_explicit< UF, GF >::value > * = nullptr>
constexpr ExpectedImpl (const ExpectedImpl< U, G > &rhs)
 
template<class U , class G , class UF = const U &, class GF = const G &, std::enable_if_t< can_value_convert_construct< U, G, UF, GF >::value &&constructor_is_explicit< UF, GF >::value > * = nullptr>
constexpr ExpectedImpl (const ExpectedImpl< U, G > &rhs)
 
template<class U , class G , class UF = U, class GF = G, std::enable_if_t< can_value_convert_construct< U, G, UF, GF >::value &&!constructor_is_explicit< UF, GF >::value > * = nullptr>
constexpr ExpectedImpl (ExpectedImpl< U, G > &&rhs)
 
template<class U , class G , class UF = U, class GF = G, std::enable_if_t< can_value_convert_construct< U, G, UF, GF >::value &&constructor_is_explicit< UF, GF >::value > * = nullptr>
constexpr ExpectedImpl (ExpectedImpl< U, G > &&rhs)
 
template<class U = T, std::enable_if_t< can_construct_from_value_type< U >::value &&!can_construct_from_value_type_explicit< U >::value > * = nullptr>
constexpr ExpectedImpl (U &&v)
 
template<class U = T, std::enable_if_t< can_construct_from_value_type< U >::value &&can_construct_from_value_type_explicit< U >::value > * = nullptr>
constexpr ExpectedImpl (U &&v)
 
template<class... Args, std::enable_if_t< std::is_constructible_v< T, Args &&... > > * = nullptr>
constexpr ExpectedImpl (std::in_place_t, Args &&...args)
 
template<class... Args, std::enable_if_t< std::is_constructible_v< E, Args &&... > > * = nullptr>
constexpr ExpectedImpl (stdx::unexpect_t, Args &&...args)
 
constexpr ExpectedImpl (const ExpectedImpl &other)
 
constexpr ExpectedImpl (ExpectedImpl &&other) noexcept(std::is_nothrow_move_constructible< E >::value &&std::is_nothrow_move_constructible< T >::value)
 
template<class G , std::enable_if_t< std::is_constructible_v< E, const G & > > * = nullptr>
constexpr ExpectedImpl (const unexpected< G > &e)
 
template<class G , std::enable_if_t< std::is_constructible_v< E, G > > * = nullptr>
constexpr ExpectedImpl (unexpected< G > &&e)
 
ExpectedImploperator= (ExpectedImpl const &other)
 
ExpectedImploperator= (ExpectedImpl &&other)
 
template<class U = T, std::enable_if_t< !std::is_same_v< ExpectedImpl< T, E >, stdx::remove_cvref_t< U > > &&!std::conjunction_v< std::is_scalar< T >, std::is_same< T, std::decay_t< U > > > &&std::is_constructible_v< T, U > &&std::is_assignable_v< T &, U > > * = nullptr>
ExpectedImploperator= (U &&v)
 
 ~ExpectedImpl ()
 
template<class U = T, class G = E>
std::enable_if_t<(std::is_move_constructible< U >::value||std::is_move_constructible< G >::value)> swap (ExpectedImpl &other) noexcept(std::is_nothrow_move_constructible< T >::value &&std::is_nothrow_move_constructible< E >::value)
 
constexpr const value_typevalue () const &
 
constexpr const value_type && value () const &&
 
value_typevalue () &
 
value_type && value () &&
 
value_typeoperator* () &
 
constexpr const value_typeoperator* () const &
 
value_typeoperator-> ()
 
constexpr const value_typeoperator-> () const
 
template<class U >
constexpr value_type value_or (U &&v) const &
 
template<class U >
constexpr value_type value_or (U &&v) &&
 
constexpr const error_typeerror () const &
 
constexpr const error_type && error () const &&
 
constexpr error_typeerror () &
 
constexpr error_type && error () &&
 
constexpr unexpected_type get_unexpected () const
 
- Public Member Functions inherited from stdx::ExpectedImplBase
constexpr ExpectedImplBase (bool has_value) noexcept
 
constexpr bool has_value () const
 
constexpr operator bool () const noexcept
 
void swap (ExpectedImplBase &other) noexcept
 

Additional Inherited Members

- Public Types inherited from stdx::ExpectedImpl< T, E >
using value_type = T
 
using error_type = E
 
using unexpected_type = unexpected< E >
 
template<class UF , class GF >
using constructor_is_explicit = std::bool_constant<!std::is_convertible_v< UF, T >||!std::is_convertible_v< GF, E > >
 
template<class U , class G , class UF , class GF >
using can_value_convert_construct = std::bool_constant< std::is_constructible_v< T, UF > &&std::is_constructible_v< E, GF > &&!std::is_constructible_v< T, ExpectedImpl< U, G > & > &&!std::is_constructible_v< T, ExpectedImpl< U, G > > &&!std::is_constructible_v< T, const ExpectedImpl< U, G > & > &&!std::is_constructible_v< T, const ExpectedImpl< U, G > > &&!std::is_convertible_v< ExpectedImpl< U, G > &, T > &&!std::is_convertible_v< ExpectedImpl< U, G >, T > &&!std::is_convertible_v< const ExpectedImpl< U, G > &, T > &&!std::is_convertible_v< const ExpectedImpl< U, G >, T > &&!std::is_constructible_v< unexpected< E >, ExpectedImpl< U, G > & > &&!std::is_constructible_v< unexpected< E >, ExpectedImpl< U, G > > &&!std::is_constructible_v< unexpected< E >, const ExpectedImpl< U, G > & > &&!std::is_constructible_v< unexpected< E >, const ExpectedImpl< U, G > > >
 
template<class U >
using can_construct_from_value_type = std::conjunction< std::negation< std::is_same< std::in_place_t, stdx::remove_cvref_t< U > > >, std::negation< std::is_same< ExpectedImpl< T, E >, stdx::remove_cvref_t< U > > >, std::negation< std::is_same< unexpected< E >, stdx::remove_cvref_t< U > > >, std::is_constructible< T, U > >
 
template<class U >
using can_construct_from_value_type_explicit = std::negation< std::is_convertible< U, T > >
 

Member Function Documentation

◆ and_then() [1/4]

template<class T , class E >
template<class Func >
constexpr auto stdx::expected< T, E >::and_then ( Func &&  func) &
inlineconstexpr

◆ and_then() [2/4]

template<class T , class E >
template<class Func >
constexpr auto stdx::expected< T, E >::and_then ( Func &&  func) &&
inlineconstexpr

◆ and_then() [3/4]

template<class T , class E >
template<class Func >
constexpr auto stdx::expected< T, E >::and_then ( Func &&  func) const &
inlineconstexpr

◆ and_then() [4/4]

template<class T , class E >
template<class Func >
constexpr auto stdx::expected< T, E >::and_then ( Func &&  func) const &&
inlineconstexpr

◆ or_else() [1/4]

template<class T , class E >
template<class Func >
constexpr auto stdx::expected< T, E >::or_else ( Func &&  func) &
inlineconstexpr

◆ or_else() [2/4]

template<class T , class E >
template<class Func >
constexpr auto stdx::expected< T, E >::or_else ( Func &&  func) &&
inlineconstexpr

◆ or_else() [3/4]

template<class T , class E >
template<class Func >
constexpr auto stdx::expected< T, E >::or_else ( Func &&  func) const &
inlineconstexpr

◆ or_else() [4/4]

template<class T , class E >
template<class Func >
constexpr auto stdx::expected< T, E >::or_else ( Func &&  func) const &&
inlineconstexpr

◆ transform() [1/4]

template<class T , class E >
template<class Func >
constexpr auto stdx::expected< T, E >::transform ( Func &&  func) &
inlineconstexpr

◆ transform() [2/4]

template<class T , class E >
template<class Func >
constexpr auto stdx::expected< T, E >::transform ( Func &&  func) &&
inlineconstexpr

◆ transform() [3/4]

template<class T , class E >
template<class Func >
constexpr auto stdx::expected< T, E >::transform ( Func &&  func) const &
inlineconstexpr

◆ transform() [4/4]

template<class T , class E >
template<class Func >
constexpr auto stdx::expected< T, E >::transform ( Func &&  func) const &&
inlineconstexpr

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