mrdocs::Expected<T, E>::Expected

Constructors

Synopses

Declared in <mrdocs/Support/Expected.hpp>

Default constructor

constexpr
Expected() noexcept;

Copy constructor

Expected(Expected const& other) = default;

Copy constructor

constexpr
Expected(Expected const& x) noexcept(std::is_nothrow_copy_constructible_v<E>)
requires std::is_copy_constructible_v<E> &&
        (!std::is_trivially_copy_constructible_v<E>);

Move constructor

Expected(Expected&& other) = default;

Move constructor

constexpr
Expected(Expected&& x) noexcept(std::is_nothrow_move_constructible_v<E>)
requires std::is_move_constructible_v<E> &&
        (!std::is_trivially_move_constructible_v<E>);

Construct from in_place_t

constexpr
explicit
Expected(std::in_place_t value) noexcept;

Construct from Unexpected

template<class G = E>
requires std::is_constructible_v<E, G const&>
constexpr
explicit(!std::is_convertible_v<const G &, E>)
Expected(Unexpected<G> const& u) noexcept(std::is_nothrow_constructible_v<E, const G &>);

Construct from Unexpected

template<class G = E>
requires std::is_constructible_v<E, G>
constexpr
explicit(!std::is_convertible_v<G, E>)
Expected(Unexpected<G>&& u) noexcept(std::is_nothrow_constructible_v<E, G>);

Construct from Expected

template<
    class U,
    class G>
requires std::is_void_v<U> &&
        std::is_constructible_v<E, G const&> &&
        (!constructible_from_expected<U, G>)
constexpr
explicit(!std::is_convertible_v<const G &, E>)
Expected(Expected<U, G> const& x) noexcept(std::is_nothrow_constructible_v<E, const G &>);

Construct from Expected

template<
    class U,
    class G>
requires std::is_void_v<U> &&
        std::is_constructible_v<E, G> &&
        (!constructible_from_expected<U, G>)
constexpr
explicit(!std::is_convertible_v<G, E>)
Expected(Expected<U, G>&& x) noexcept(std::is_nothrow_constructible_v<E, G>);
template<class... Args>
requires std::is_constructible_v<E, Args...>
constexpr
explicit
Expected(
    unexpect_t,
    Args...&&... args) noexcept(std::is_nothrow_constructible_v<E, Args...>);
template<
    class U,
    class... Args>
requires std::is_constructible_v<E, std::initializer_list<U>&, Args...>
constexpr
explicit
Expected(
    unexpect_t,
    std::initializer_list<U> il,
    Args...&&... args) noexcept(std::is_nothrow_constructible_v<E, std::initializer_list<U> &, Args...>);

Created with MrDocs