Create a managed pointer by taking ownership from compatible original.

Synopsis

Declared in <bslma_managedptr.h>

template<class BDE_OTHER_TYPE>
ManagedPtr(ManagedPtr<BDE_OTHER_TYPE>&& original) noexcept
requires bsl::is_convertible<BDE_OTHER_TYPE *, TARGET_TYPE *>::value;

Description

Create a managed pointer having the same target object as the specified original, transfer ownership of the object managed by original (if any) to this managed pointer, and reset original to empty. TARGET_TYPE must be an accessible and unambiguous base of BDE_OTHER_TYPE.

Parameters

Name

Description

original

compatible managed pointer from which to take ownership

Created with MrDocs