mrdocs::Optional::Optional

Construct from another Optional with a convertible contained value.

Synopsis

Declared in <mrdocs/ADT/Optional.hpp>

template<typename U>
requires (!std::is_same_v<T, U>) && std::is_constructible_v<T, U const&>
            && ConstructFromContainedValue<U>
constexpr
explicit(!std::is_convertible_v<const U &, T>)
Optional(Optional<U> const& t) noexcept(/* see-below */);

Exception specification

This function is potentially-throwing unless std::is_nothrow_constructible_v<T, const U &>.

Parameters

NameDescription
tSource optional.