Assigns the contained value from u, destroying the old value if there

Synopsis

Declared in <beman/optional/optional.hpp>

template<class U = T>
constexpr
optional<T>&
operator=(U&& u)
requires detail::enable_assign_forward<T, U>;

Description

Assigns the contained value from u, destroying the old value if there was one.

Return Value

optional&

Template Parameters

Name Description

U

The type of the value to assign.

Parameters

Name Description

u

The value to assign.

Created with MrDocs