[#beman-optional-optional-03-operator_assign-07] = xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::xref:beman/optional/optional-03.adoc[optional]::operator= :relfileprefix: ../../../ :mrdocs: Assigns the stored value from `rhs` if it has one, destroying the old value if there == Synopsis Declared in `<beman/optional/optional.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class U> constexpr xref:beman/optional/optional-03.adoc[optional<T>]& operator=(xref:beman/optional/optional-03.adoc[optional<U>]&& rhs) requires (detail::enable_assign_from_other<T, U, U>); ---- == Description Converting move assignment operator. Moves the value from `rhs` if there is one. Otherwise resets the stored value in `*this`. == Return Value Reference to the current object == Parameters [cols=2] |=== | Name | Description | *rhs* | The object to move assign from |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#