[#bsl-shared_ptr-0a-operator_assign-0f]
= xref:bsl.adoc[bsl]::xref:bsl/shared_ptr-0a.adoc[shared&lowbar;ptr]::operator&equals;
:relfileprefix: ../../
:mrdocs:

Make this shared pointer manage the same modifiable object as the specified `rhs` shared pointer to the (template parameter) type `COMPATIBLE&lowbar;TYPE`, use the same deleter as `rhs`, and refer to `(ELEMENT&lowbar;TYPE &ast;)rhs&period;get()`&semi; return a reference providing modifiable access to this shared pointer&period; Note that if `rhs` is empty, then this shared pointer will also be empty after the assignment&period; Also note that if `&ast;this` is the same object as `rhs`, then this method has no effect&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/shared_ptr-0a.adoc[shared&lowbar;ptr]&
operator&equals;(xref:bsl/shared_ptr-0a.adoc[shared&lowbar;ptr] const& rhs) noexcept;
----


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