Assigns the stored value from rhs if it has one, destroying the old value if there
<beman/optional/optional.hpp>
template<class U>
constexpr
optional<T>&
operator=(optional<U>&& rhs)
requires (detail::enable_assign_from_other<T, U, U>);
Converting move assignment operator.
Moves the value from rhs if there is one. Otherwise resets the stored value in *this.
| Name | Description |
|---|---|
| rhs | The object to move assign from |