[#beman-optional-optional-03-operator_assign-0b6] = xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::xref:beman/optional/optional-03.adoc[optional]::operator= :relfileprefix: ../../../ :mrdocs: Assigns the contained value from `u,` destroying the old value if there == Synopsis Declared in `<beman/optional/optional.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class U = T> constexpr xref:beman/optional/optional-03.adoc[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 [cols="1,4"] |=== |Name|Description | *U* | The type of the value to assign. |=== == Parameters [cols="1,4"] |=== |Name|Description | *u* | The value to assign. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#