[#bsl-shared_ptr-0a-operator_assign-097] = xref:bsl.adoc[bsl]::xref:bsl/shared_ptr-0a.adoc[shared_ptr]::operator= :relfileprefix: ../../ :mrdocs: Make this shared pointer refer to and manage the same modifiable object as the specified `rhs` shared pointer to the (template parameter) type `COMPATIBLE_TYPE`, using the same deleter as `rhs` and referring to `(ELEMENT_TYPE *)rhs.get()`, and return a reference to this modifiable shared pointer. If this shared pointer is already managing a (possibly shared) object, then release the shared reference to that object, and destroy it using its associated deleter if this shared pointer held the last shared reference to that object. Note that if `rhs` is empty, then this shared pointer will also be empty after the assignment. Assign from the specified compatible `shared_ptr` `rhs`. == Synopsis Declared in `<bslstl_sharedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class COMPATIBLE_TYPE> xref:bsl/shared_ptr-0a.adoc[shared_ptr]& operator=(xref:bsl/shared_ptr-0a.adoc[shared_ptr<COMPATIBLE_TYPE>] const& rhs) noexcept requires is_convertible<COMPATIBLE_TYPE *, ELEMENT_TYPE *>::value; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#