This class holds a managed pointer reference, returned by the implicit conversion operator in the class ManagedPtr. This class is used to allow the construction of managed pointers from temporary managed pointer objects, since temporaries cannot bind to the reference to a modifiable object used in the copy constructor and copy-assignment operator for ManagedPtr. Note that while no members or methods of this class template depend on the specified TARGET_TYPE, it is important to carry this type into conversions to support passing ownership of ManagedPtr_Members pointers when assigning or constructing ManagedPtr objects.
Declared in <bslma_managedptr.h>
template<class TARGET_TYPE>
class ManagedPtr_Ref;
| Name | Description |
|---|---|
ManagedPtr_Ref [constructor] | Create a ManagedPtr_Ref object having the specified base value for its base attribute, and the specified target for its target attribute. Note that target (but not base) may be null. |
~ManagedPtr_Ref [destructor] | Destroy this object. Note that the referenced managed object is not destroyed. |
base | Return a pointer to the managed state of a ManagedPtr object. |
target | Return a pointer to the referenced object. |