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> const& rhs)
requires (detail::enable_assign_from_other<T, U, const U&>);
Converting copy assignment operator.
Copies the value from rhs if there is one. Otherwise resets the stored value in *this.
| Name | Description |
|---|---|
| rhs | The object to copy assign from |