mrdocs::Optional::Optional

Construct from a value.

Synopsis

Declared in <mrdocs/ADT/Optional.hpp>

template<typename U = std::remove_cv_t<T>>
requires (!std::is_same_v<Optional, std::remove_cvref_t<U>>)
            && (!std::is_same_v<std::in_place_t, std::remove_cvref_t<U>>)
            && std::is_constructible_v<T, U>
            && NotConstructingBoolFromOptional<U>
constexpr
explicit(!std::is_convertible_v<U, T>)
Optional(U&& u) noexcept(std::is_nothrow_constructible_v<T, U>);

Parameters

Name

Description

u

The value to store. It must be convertible to T.

Created with MrDocs