|
|
constexpr | expected (const expected &rhs)=default |
| |
|
constexpr | expected (expected &&rhs)=default |
| |
|
template<class U , class G , std::enable_if_t<!std::is_same_v< expected< U, G >, expected > > * = nullptr, std::enable_if_t< std::is_convertible_v< const U &, T > &&std::is_convertible_v< const G &, E > > * = nullptr, expected_detail::enable_from_other_expected_t< T, E, U, G, const U &, const G & > * = nullptr> |
| constexpr | expected (const expected< U, G > &rhs) noexcept(std::is_nothrow_constructible_v< T, const U & > &&std::is_nothrow_constructible_v< E, const G & >) |
| |
|
template<class U , class G , std::enable_if_t<!std::is_same_v< expected< U, G >, expected > > * = nullptr, std::enable_if_t<!(std::is_convertible_v< const U &, T > &&std::is_convertible_v< const G &, E >)> * = nullptr, expected_detail::enable_from_other_expected_t< T, E, U, G, const U &, const G & > * = nullptr> |
| constexpr | expected (const expected< U, G > &rhs) noexcept(std::is_nothrow_constructible_v< T, const U & > &&std::is_nothrow_constructible_v< E, const G & >) |
| |
|
template<class U , class G , std::enable_if_t<!std::is_same_v< expected< U, G >, expected > > * = nullptr, std::enable_if_t< std::is_convertible_v< U, T > &&std::is_convertible_v< G, E > > * = nullptr, expected_detail::enable_from_other_expected_t< T, E, U, G, U, G > * = nullptr> |
| constexpr | expected (expected< U, G > &&rhs) noexcept(std::is_nothrow_constructible_v< T, U > &&std::is_nothrow_constructible_v< E, G >) |
| |
|
template<class U , class G , std::enable_if_t<!std::is_same_v< expected< U, G >, expected > > * = nullptr, std::enable_if_t<!(std::is_convertible_v< U, T > &&std::is_convertible_v< G, E >)> * = nullptr, expected_detail::enable_from_other_expected_t< T, E, U, G, U, G > * = nullptr> |
| constexpr | expected (expected< U, G > &&rhs) noexcept(std::is_nothrow_constructible_v< T, U > &&std::is_nothrow_constructible_v< E, G >) |
| |
|
template<class U = std::remove_cv_t<T>, std::enable_if_t< std::is_convertible_v< U, T > > * = nullptr, expected_detail::enable_forward_t< T, E, U > * = nullptr> |
| constexpr | expected (U &&v) noexcept(std::is_nothrow_constructible_v< T, U >) |
| |
|
template<class U = std::remove_cv_t<T>, std::enable_if_t<!std::is_convertible_v< U, T > > * = nullptr, expected_detail::enable_forward_t< T, E, U > * = nullptr> |
| constexpr | expected (U &&v) noexcept(std::is_nothrow_constructible_v< T, U >) |
| |
|
template<class G , std::enable_if_t<!std::is_convertible_v< const G &, E > > * = nullptr, std::enable_if_t< std::is_constructible_v< E, const G & > > * = nullptr> |
| constexpr | expected (const unexpected< G > &e) noexcept(std::is_nothrow_constructible_v< E, const G & >) |
| |
|
template<class G , std::enable_if_t< std::is_convertible_v< const G &, E > > * = nullptr, std::enable_if_t< std::is_constructible_v< E, const G & > > * = nullptr> |
| constexpr | expected (unexpected< G > const &e) noexcept(std::is_nothrow_constructible_v< E, const G & >) |
| |
|
template<class G , std::enable_if_t<!std::is_convertible_v< G, E > > * = nullptr, std::enable_if_t< std::is_constructible_v< E, G > > * = nullptr> |
| constexpr | expected (unexpected< G > &&e) noexcept(std::is_nothrow_constructible_v< E, G >) |
| |
|
template<class G , std::enable_if_t< std::is_convertible_v< G, E > > * = nullptr, std::enable_if_t< std::is_constructible_v< E, G > > * = nullptr> |
| constexpr | expected (unexpected< G > &&e) noexcept(std::is_nothrow_constructible_v< E, G >) |
| |
|
template<class... Args, std::enable_if_t< std::is_constructible_v< T, Args... > > * = nullptr> |
| constexpr | expected (std::in_place_t, Args &&... args) noexcept(std::is_nothrow_constructible_v< T, Args... >) |
| |
|
template<class U , class... Args, std::enable_if_t< std::is_constructible_v< T, std::initializer_list< U > &, Args... > > * = nullptr> |
| constexpr | expected (std::in_place_t, std::initializer_list< U > il, Args &&... args) noexcept(std::is_nothrow_constructible_v< T, std::initializer_list< U > &, Args... >) |
| |
|
template<class Fn , class... Args> |
| constexpr | expected (expected_detail::construct_with_invoke_result_t tag, Fn &&func, Args &&... args) noexcept(noexcept(static_cast< T >(std::invoke(std::forward< Fn >(func), std::forward< Args >(args)...)))) |
| |
|
template<class... Args, std::enable_if_t< std::is_constructible_v< E, Args... > > * = nullptr> |
| constexpr | expected (unexpect_t, Args &&... args) noexcept(std::is_nothrow_constructible_v< E, Args... >) |
| |
|
template<class U , class... Args, std::enable_if_t< std::is_constructible_v< E, std::initializer_list< U > &, Args... > > * = nullptr> |
| constexpr | expected (unexpect_t, std::initializer_list< U > il, Args &&... args) noexcept(std::is_nothrow_constructible_v< E, std::initializer_list< U > &, Args... >) |
| |
|
template<class Fn , class... Args> |
| constexpr | expected (expected_detail::construct_with_invoke_result_t tag1, unexpect_t tag2, Fn &&func, Args &&... args) noexcept(noexcept(static_cast< E >(std::invoke(std::forward< Fn >(func), std::forward< Args >(args)...)))) |
| |
|
constexpr expected & | operator= (const expected &rhs)=default |
| |
|
constexpr expected & | operator= (expected &&rhs)=default |
| |
|
template<class U = std::remove_cv_t<T>, std::enable_if_t<!std::is_same_v< expected, expected_detail::remove_cvref_t< U > > &&!expected_detail::is_specialization_v< expected_detail::remove_cvref_t< U >, unexpected > &&std::is_constructible_v< T, U > &&std::is_assignable_v< T &, U > &&(std::is_nothrow_constructible_v< T, U >||std::is_nothrow_move_constructible_v< T >||std::is_nothrow_move_constructible_v< E >)> * = nullptr> |
| constexpr expected & | operator= (U &&v) noexcept(std::is_nothrow_constructible_v< T, U > &&std::is_nothrow_assignable_v< T &, U >) |
| |
|
template<class G , class GF = const G&, std::enable_if_t< std::is_constructible_v< E, GF > &&std::is_assignable_v< E &, GF > &&(std::is_nothrow_constructible_v< E, GF >||std::is_nothrow_move_constructible_v< T >||std::is_nothrow_move_constructible_v< E >)> * = nullptr> |
| constexpr expected & | operator= (const unexpected< G > &rhs) noexcept(std::is_nothrow_constructible_v< E, GF > &&std::is_nothrow_assignable_v< E &, GF >) |
| |
|
template<class G , class GF = G, std::enable_if_t< std::is_constructible_v< E, GF > &&std::is_assignable_v< E &, GF > &&(std::is_nothrow_constructible_v< E, GF >||std::is_nothrow_move_constructible_v< T >||std::is_nothrow_move_constructible_v< E >)> * = nullptr> |
| constexpr expected & | operator= (unexpected< G > &&rhs) noexcept(std::is_nothrow_constructible_v< E, GF > &&std::is_nothrow_assignable_v< E &, GF >) |
| |
|
template<class... Args, typename std::enable_if_t< std::is_nothrow_constructible_v< T, Args &&... >, bool > = false> |
| constexpr T & | emplace (Args &&... args) |
| |
|
template<class U , class... Args, std::enable_if_t< std::is_nothrow_constructible_v< T, std::initializer_list< U > &, Args &&... > > * = nullptr> |
| constexpr T & | emplace (std::initializer_list< U > il, Args &&... args) |
| |
|
template<class OT = T, class OE = E> |
| constexpr std::enable_if_t< std::is_swappable_v< OT > &&std::is_swappable_v< OE > &&std::is_move_constructible_v< OT > &&std::is_move_constructible_v< OE > &&(std::is_nothrow_move_constructible_v< OT >||std::is_nothrow_move_constructible_v< OE >)> | swap (expected &rhs) noexcept(std::is_nothrow_move_constructible_v< T > &&std::is_nothrow_swappable_v< T > &&std::is_nothrow_move_constructible_v< E > &&std::is_nothrow_swappable_v< E >) |
| |
|
constexpr const T * | operator-> () const noexcept |
| |
|
constexpr T * | operator-> () noexcept |
| |
|
constexpr const T & | operator* () const &noexcept |
| |
|
constexpr T & | operator* () &noexcept |
| |
|
constexpr const T && | operator* () const &&noexcept |
| |
|
constexpr T && | operator* () &&noexcept |
| |
|
constexpr bool | has_value () const noexcept |
| |
|
constexpr | operator bool () const noexcept |
| |
|
constexpr const T & | value () const & |
| |
|
constexpr T & | value () & |
| |
|
constexpr const T && | value () const && |
| |
|
constexpr T && | value () && |
| |
|
constexpr const E & | error () const &noexcept |
| |
|
constexpr E & | error () &noexcept |
| |
|
constexpr const E && | error () const &&noexcept |
| |
|
constexpr E && | error () &&noexcept |
| |
|
template<class U = std::remove_cv_t<T>> |
| constexpr T | value_or (U &&v) const &noexcept(std::is_nothrow_copy_constructible_v< T > &&expected_detail::is_nothrow_convertible_v< U, T >) |
| |
|
template<class U = std::remove_cv_t<T>> |
| constexpr T | value_or (U &&v) &&noexcept(std::is_nothrow_move_constructible_v< T > &&expected_detail::is_nothrow_convertible_v< U, T >) |
| |
|
template<class G = E> |
| constexpr E | error_or (G &&v) const &noexcept(std::is_nothrow_copy_constructible_v< E > &&expected_detail::is_nothrow_convertible_v< G, E >) |
| |
|
template<class G = E> |
| constexpr E | error_or (G &&v) &&noexcept(std::is_nothrow_move_constructible_v< E > &&expected_detail::is_nothrow_convertible_v< G, E >) |
| |
|
template<class F , class GE = E, std::enable_if_t< std::is_constructible_v< GE, GE & > > * = nullptr> |
| constexpr auto | and_then (F &&f) & |
| |
|
template<class F , class GE = E, std::enable_if_t< std::is_constructible_v< GE, const GE & > > * = nullptr> |
| constexpr auto | and_then (F &&f) const & |
| |
|
template<class F , class GE = E, std::enable_if_t< std::is_constructible_v< GE, GE && > > * = nullptr> |
| constexpr auto | and_then (F &&f) && |
| |
|
template<class F , class GE = E, std::enable_if_t< std::is_constructible_v< GE, const GE > > * = nullptr> |
| constexpr auto | and_then (F &&f) const && |
| |
|
template<class F , class UT = T, std::enable_if_t< std::is_constructible_v< UT, UT & > > * = nullptr> |
| constexpr auto | or_else (F &&f) & |
| |
|
template<class F , class UT = T, std::enable_if_t< std::is_constructible_v< UT, const UT & > > * = nullptr> |
| constexpr auto | or_else (F &&f) const & |
| |
|
template<class F , class UT = T, std::enable_if_t< std::is_constructible_v< UT, UT && > > * = nullptr> |
| constexpr auto | or_else (F &&f) && |
| |
|
template<class F , class UT = T, std::enable_if_t< std::is_constructible_v< UT, const UT > > * = nullptr> |
| constexpr auto | or_else (F &&f) const && |
| |
|
template<class F , class GE = E, std::enable_if_t< std::is_constructible_v< GE, GE & > > * = nullptr> |
| constexpr auto | transform (F &&f) & |
| |
|
template<class F , class GE = E, std::enable_if_t< std::is_constructible_v< GE, const GE & > > * = nullptr> |
| constexpr auto | transform (F &&f) const & |
| |
|
template<class F , class GE = E, std::enable_if_t< std::is_constructible_v< GE, GE && > > * = nullptr> |
| constexpr auto | transform (F &&f) && |
| |
|
template<class F , class GE = E, std::enable_if_t< std::is_constructible_v< GE, const GE > > * = nullptr> |
| constexpr auto | transform (F &&f) const && |
| |
|
template<class F , class UT = T, std::enable_if_t< std::is_constructible_v< UT, UT & > > * = nullptr> |
| constexpr auto | transform_error (F &&f) & |
| |
|
template<class F , class UT = T, std::enable_if_t< std::is_constructible_v< UT, const UT & > > * = nullptr> |
| constexpr auto | transform_error (F &&f) const & |
| |
|
template<class F , class UT = T, std::enable_if_t< std::is_constructible_v< UT, UT && > > * = nullptr> |
| constexpr auto | transform_error (F &&f) && |
| |
|
template<class F , class UT = T, std::enable_if_t< std::is_constructible_v< UT, const UT > > * = nullptr> |
| constexpr auto | transform_error (F &&f) const && |
| |