[#bsl-optional-072-operator_assign-0f] = xref:bsl.adoc[bsl]::xref:bsl/optional-072.adoc[optional]::operator= :relfileprefix: ../../ :mrdocs: Disengage this object if the specified `rhs` object is disengaged, and move assign to this object the value of `rhs.value()` (of `t_ANY_TYPE`) converted to `t_TYPE` otherwise. Return a reference providing modifiable access to this object. Note that this method does not participate in overload resolution unless `t_TYPE` and `t_ANY_TYPE` are compatible. This assignment operator can be called in constant expressions only when neither `t_TYPE` nor `t_ANY_TYPE` is allocator‐aware. == Synopsis Declared in `<bslstl_optional.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_ANY_TYPE> constexpr xref:bsl/optional-072.adoc[optional<t_TYPE>]& operator=(xref:BloombergLP/bslmf/MovableRef_Deduced.adoc[BloombergLP::bslmf::MovableRef_Deduced<optional<t_ANY_TYPE>>] rhs); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#