[#bsl-function-0a-operator_assign-0f04]
= xref:bsl.adoc[bsl]::xref:bsl/function-0a.adoc[function]::operator&equals;
:relfileprefix: ../../
:mrdocs:

Set the target of this object to the target (if any) held by the specified `rhs` object, destroy the target (if any) previously held by `&ast;this`, and return `&ast;this`&period; The result is equivalent to having constructed `&ast;this` from `rhs` using the extended move constructor with allocator `this&hyphen;&gt;get&lowbar;allocator()`&period; If an exception is thrown, `rhs` will have a valid but unspecified value and `&ast;this` will not be modified&period; Note that an exception will never be thrown if `get&lowbar;allocator() &equals;&equals; rhs&period;get&lowbar;allocator()`&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;function&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/function-0a.adoc[bsl::function&lt;PROTOTYPE&gt;]&
operator&equals;(xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;function&gt;] rhs);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
