[#BloombergLP-bslma-ManagedPtr-0fa-operator_assign-013] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/ManagedPtr-0fa.adoc[ManagedPtr]::operator= :relfileprefix: ../../../ :mrdocs: If this object and the specified `rhs` manage the same object, return a reference to this managed pointer; otherwise, destroy the managed object owned by this managed pointer, transfer ownership of the managed object owned by `rhs` to this managed pointer, set this managed pointer to point to the target object referenced by `rhs`, reset `rhs` to empty, and return a reference to this managed pointer. `TARGET_TYPE` must be an accessible and unambiguous base of `BDE_OTHER_TYPE`. == Synopsis Declared in `<bslma_managedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class BDE_OTHER_TYPE> xref:BloombergLP/bslma/ManagedPtr-0fa.adoc[ManagedPtr<TARGET_TYPE>]& operator=(xref:BloombergLP/bslma/ManagedPtr-0fa.adoc[ManagedPtr<BDE_OTHER_TYPE>]&& rhs) noexcept requires bsl::is_convertible<BDE_OTHER_TYPE *, TARGET_TYPE *>::value; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#