mrdocs::Expected::Expected

Constructors

Synopses

Declared in <mrdocs/Support/Expected.hpp>

Default constructor

constexpr
Expected() noexcept(std::is_nothrow_default_constructible_v<T>)
requires std::is_default_constructible_v<T>;

Copy constructor

Expected(Expected const& other) = default;

Copy constructor

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

Construct from Expected

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

Move constructor

Expected(Expected&& other) = default;

Move constructor

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

Construct from Expected

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

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 U

template<class U = T>
requires (!std::is_same_v<std::remove_cvref_t<U>, Expected>) &&
        (!std::is_same_v<std::remove_cvref_t<U>, std::in_place_t>) &&
        (!detail::isUnexpected<std::remove_cvref_t<U>>) &&
        std::is_constructible_v<T, U>
constexpr
explicit(!std::is_convertible_v<U, T>)
Expected(U&& v) noexcept(std::is_nothrow_constructible_v<T, U>);

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>);
template<class... Args>
requires std::is_constructible_v<T, Args...>
constexpr
explicit
Expected(
    std::in_place_t,
    Args&&... args) noexcept(std::is_nothrow_constructible_v<T, Args...>);
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<T, std::initializer_list<U>&, Args...>
constexpr
explicit
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 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