[#BloombergLP-bslma-ManagedPtr_Members]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::ManagedPtr&lowbar;Members
:relfileprefix: ../../
:mrdocs:

Type&hyphen;agnostic container for the internal state of a managed pointer&period;

== Synopsis

Declared in `&lt;bslma&lowbar;managedptr&lowbar;members&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class ManagedPtr&lowbar;Members;
----

== Description

This class provides a type&hyphen;agnostic container for managed pointer data members&period; This type exists so that a `ManagedPtr&lowbar;Ref` (see `bslma&lowbar;managedptr`) can point to the representation of a `ManagedPtr` even if the `ManagedPtr&lowbar;Ref` object is instantiated on a different type than the managed pointer type (e&period;g&period;, in the case of conversions or aliasing)&period; `ManagedPtr&lowbar;Members` also &quot;erases&quot; the type of each member, so that the same object code can be shared between all instantiations of the `ManagedPtr` class template, reducing template bloat&period; Note that objects of this type have an &quot;unset&quot; state, where the pointer member has a null value and the deleter member has an unspecified value&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/ManagedPtr_Members/2constructor-00.adoc[`ManagedPtr&lowbar;Members`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bslma/ManagedPtr_Members/clear.adoc[`clear`] 
| Reset this object to an unset state with no effect on the previously managed object (if any)&period;
| xref:BloombergLP/bslma/ManagedPtr_Members/deleter.adoc[`deleter`] 
| Return a reference to the deleter for the currently managed object&period;
| xref:BloombergLP/bslma/ManagedPtr_Members/move.adoc[`move`] 
| Take ownership of the managed state from `other`&period;
| xref:BloombergLP/bslma/ManagedPtr_Members/moveAssign.adoc[`moveAssign`] 
| Destroy the managed object and take ownership from `other`&period;
| xref:BloombergLP/bslma/ManagedPtr_Members/pointer.adoc[`pointer`] 
| Return the address of the currently managed object, or 0 if unset&period;
| xref:BloombergLP/bslma/ManagedPtr_Members/runDeleter.adoc[`runDeleter`] 
| Destroy the currently managed object (if any)&period;
| xref:BloombergLP/bslma/ManagedPtr_Members/set.adoc[`set`] 
| Reset this object to manage the specified object and deleter&period;
| xref:BloombergLP/bslma/ManagedPtr_Members/setAliasPtr.adoc[`setAliasPtr`] 
| Set the exposed pointer to the specified `alias`&period;
| xref:BloombergLP/bslma/ManagedPtr_Members/swap.adoc[`swap`] 
| Efficiently exchange the state of this object with that of `other`&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
