iceberg-cpp
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
iceberg::expected< void, E > Class Template Reference
Inheritance diagram for iceberg::expected< void, E >:
iceberg::expected_detail::move_assign_base< void, E > iceberg::expected_detail::default_ctor_base< void, E >

Public Types

typedef T value_type
 
typedef E error_type
 
typedef unexpected< E > unexpected_type
 
template<class U >
using rebind = expected< U, error_type >
 

Public Member Functions

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 G &, E > > * = nullptr, expected_detail::enable_from_other_void_expected_t< E, U, G, const G & > * = nullptr>
constexpr expected (const expected< U, G > &rhs) noexcept(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 G &, E > > * = nullptr, expected_detail::enable_from_other_void_expected_t< E, U, G, const G & > * = nullptr>
constexpr expected (const expected< U, G > &rhs) noexcept(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< G, E > > * = nullptr, expected_detail::enable_from_other_void_expected_t< E, U, G, G > * = nullptr>
constexpr expected (expected< U, G > &&rhs) noexcept(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< G, E > > * = nullptr, expected_detail::enable_from_other_void_expected_t< E, U, G, G > * = nullptr>
constexpr expected (expected< U, G > &&rhs) noexcept(std::is_nothrow_constructible_v< E, 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 (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 >)
 
constexpr expected (std::in_place_t) noexcept
 
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)...))))
 
expected & operator= (const expected &rhs)=default
 
expected & operator= (expected &&rhs)=default
 
template<class G , class GF = const G&, std::enable_if_t< std::is_constructible_v< E, GF > &&std::is_assignable_v< E &, GF > > * = 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 > > * = nullptr>
constexpr expected & operator= (unexpected< G > &&rhs) noexcept(std::is_nothrow_constructible_v< E, GF > &&std::is_nothrow_assignable_v< E &, GF >)
 
constexpr void emplace ()
 
template<class OE = E>
constexpr std::enable_if_t< std::is_swappable_v< OE > &&std::is_move_constructible_v< OE > > swap (expected &rhs) noexcept(std::is_nothrow_move_constructible_v< E > &&std::is_nothrow_swappable_v< E >)
 
constexpr void operator* () const noexcept
 
constexpr bool has_value () const noexcept
 
constexpr operator bool () const noexcept
 
constexpr void value () const &
 
constexpr void value () &&
 
constexpr const E & error () const &noexcept
 
constexpr E & error () &noexcept
 
constexpr const E && error () const &&noexcept
 
constexpr E && error () &&noexcept
 
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 >
constexpr auto or_else (F &&f) &
 
template<class F >
constexpr auto or_else (F &&f) const &
 
template<class F >
constexpr auto or_else (F &&f) &&
 
template<class F >
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 >
constexpr auto transform_error (F &&f) &
 
template<class F >
constexpr auto transform_error (F &&f) const &
 
template<class F >
constexpr auto transform_error (F &&f) &&
 
template<class F >
constexpr auto transform_error (F &&f) const &&
 

Friends

template<class T2 , class E2 >
constexpr std::enable_if_t< std::is_void_v< T2 > &&expected_detail::is_equality_result_convertible_to_bool_v< E, E2 >, bool > operator== (const expected &x, const expected< T2, E2 > &y) noexcept(expected_detail::is_nothrow_equality_result_convertible_to_bool_v< E, E2 >)
 
template<class T2 , class E2 >
constexpr std::enable_if_t< std::is_void_v< T2 > &&expected_detail::is_equality_result_convertible_to_bool_v< E, E2 >, bool > operator!= (const expected &x, const expected< T2, E2 > &y) noexcept(noexcept(x==y))
 
template<class E2 >
constexpr std::enable_if_t< expected_detail::is_equality_result_convertible_to_bool_v< E, E2 >, bool > operator== (const expected &x, const unexpected< E2 > &e) noexcept(expected_detail::is_nothrow_equality_result_convertible_to_bool_v< E, E2 >)
 
template<class E2 >
constexpr std::enable_if_t< expected_detail::is_equality_result_convertible_to_bool_v< E, E2 >, bool > operator!= (const expected &x, const unexpected< E2 > &e) noexcept(noexcept(x==e))
 

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