Assignment operators
Synopses
Declared in <bslma_managedptr.h>
Assign ownership from rhs to this managed pointer.
ManagedPtr<TARGET_TYPE>&
operator=(ManagedPtr& rhs) noexcept;
Assign ownership from compatible rhs to this managed pointer.
template<class BDE_OTHER_TYPE>
ManagedPtr<TARGET_TYPE>&
operator=(ManagedPtr<BDE_OTHER_TYPE>&& rhs) noexcept
requires bsl::is_convertible<BDE_OTHER_TYPE *, TARGET_TYPE *>::value;
Destroy the managed object (if any) and reset this pointer to empty.
ManagedPtr<TARGET_TYPE>&
operator=(bsl::nullptr_t nullPointerLiteral);
Assign ownership from the managed pointer referenced by ref.
Assign ownership from rhs to this managed pointer.
Return Value
reference to this managed pointer
Parameters
Name |
Description |
rhs |
managed pointer from which to take ownership |
nullPointerLiteral |
null‐pointer literal (unused; selects this overload) |
ref |
managed‐pointer reference from which to take ownership |
Created with MrDocs