Transfer, to this shared pointer, ownership of the modifiable object managed by the specified rhs auto pointer to the (template parameter) type COMPATIBLE_TYPE, and make this shared pointer refer to (ELEMENT_TYPE *)rhs.get(). delete(autoPtr.release()) will be called to destroy the shared object when all references have been released. If this shared pointer is already managing a (possibly shared) object, then release the reference to that shared 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 be empty after the assignment.
Declared in <bslstl_sharedptr.h>
template<class COMPATIBLE_TYPE>
shared_ptr&
operator=(std::auto_ptr<COMPATIBLE_TYPE> rhs)
requires is_convertible<COMPATIBLE_TYPE *, ELEMENT_TYPE *>::value;