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. Reset rhs to an empty state, not pointing to any object, unless *this is the same object as rhs. This function does not exist unless a pointer to (template parameter) COMPATIBLE_TYPE is convertible to a pointer to the (template parameter) ELEMENT_TYPE of this shared_ptr. Note that if rhs is empty, then this shared pointer will also be empty after the assignment. Move-assign from the specified compatible shared_ptr rhs.
Declared in <bslstl_sharedptr.h>
template<class COMPATIBLE_TYPE>
shared_ptr&
operator=(shared_ptr<COMPATIBLE_TYPE>&& rhs) noexcept
requires is_convertible<COMPATIBLE_TYPE *, ELEMENT_TYPE *>::value;