BloombergLP::bslma::ManagedPtr::operator=

Assignment operators

Synopses

Declared in <bslma_managedptr.h>

Assign ownership from rhs to this managed pointer.

ManagedPtr<TARGET_TYPE>&
operator=(ManagedPtr& rhs) noexcept;
» more...

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;
» more...

Destroy the managed object (if any) and reset this pointer to empty.

ManagedPtr<TARGET_TYPE>&
operator=(bsl::nullptr_t nullPointerLiteral);
» more...

Assign ownership from the managed pointer referenced by ref.

ManagedPtr<TARGET_TYPE>&
operator=(ManagedPtr_Ref<TARGET_TYPE> ref) noexcept;
» more...

Assign ownership from rhs to this managed pointer.

ManagedPtr<TARGET_TYPE>&
operator=(bslmf::MovableRef<ManagedPtr> rhs) noexcept;
» more...

Return Value

reference to this managed pointer

Parameters

NameDescription
rhsmanaged pointer from which to take ownership
nullPointerLiteralnull-pointer literal (unused; selects this overload)
refmanaged-pointer reference from which to take ownership