|
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 > > |
|
|
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) |
|
ExpectedImpl & | operator= (ExpectedImpl const &other) |
|
ExpectedImpl & | operator= (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> |
ExpectedImpl & | operator= (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_type & | value () const & |
|
constexpr const value_type && | value () const && |
|
value_type & | value () & |
|
value_type && | value () && |
|
value_type & | operator* () & |
|
constexpr const value_type & | operator* () const & |
|
value_type * | operator-> () |
|
constexpr const value_type * | operator-> () 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_type & | error () const & |
|
constexpr const error_type && | error () const && |
|
constexpr error_type & | error () & |
|
constexpr error_type && | error () && |
|
constexpr unexpected_type | get_unexpected () const |
|
constexpr | ExpectedImplBase (bool has_value) noexcept |
|
constexpr bool | has_value () const |
|
constexpr | operator bool () const noexcept |
|
void | swap (ExpectedImplBase &other) noexcept |
|