mrdocs::Optional::operator=

Assignment operator

Synopsis

Declared in <mrdocs/ADT/Optional.hpp>

template<typename U>
requires (!std::is_same_v<T, U>)
            && std::is_constructible_v<T, U>
            && std::is_assignable_v<T&, U>
            && (!detail::ConvertsFromOptional<T, U>::value)
            && (!detail::AssignsFromOptional<T, U>::value)
constexpr
Optional&
operator=(Optional<U>&& u) noexcept(/* see-below */);

Exception specification

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

Return Value

Reference to the current object

Parameters

Name

Description

u

The object to move assign from

Created with MrDocs