[#bsl-function-0a-operator_assign-0f0f] = xref:bsl.adoc[bsl]::xref:bsl/function-0a.adoc[function]::operator= :relfileprefix: ../../ :mrdocs: Set the target of this object to a copy of the target (if any) held by the specified `rhs` object, destroy the target (if any) previously held by `*this`, and return `*this`. The result is equivalent to having constructed `*this` from `rhs` using the extended copy constructor with allocator `this‐>get_allocator()`. If an exception is thrown, `*this` is not modified (i.e., copy assignment provides the strong exception guarantee). == Synopsis Declared in `<bslstl_function.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/function-0a.adoc[bsl::function<PROTOTYPE>]& operator=(xref:bsl/function-0a.adoc[function] const& rhs); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#