This friend declaration provides access to the internal data members while constructing a weak pointer from a weak pointer of a different type.
Synopsis
Declared in <bslstl_sharedptr.h>
template<class ELEMENT_TYPE>
class weak_ptr;
Type Aliases
Name |
Description |
For weak pointers to non‐array types, |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this weak pointer object. If this weak pointer manages a (possibly shared) object, release the weak reference to that object. |
Assignment operators |
|
Return a shared pointer to the object referred to by this weak pointer and managing the same object as that managed by this weak pointer (if any) if |
|
Return |
|
Return a shared pointer to the object referred to by this weak pointer if |
|
Return a "snapshot" of the current number of shared pointers that share ownership of the object referred to by this weak pointer, or 0 if this weak pointer is in the empty state. Note that the behavior of this method is the same as that of |
|
|
|
|
|
Return an unspecified value such that, for any object |
|
Return the address providing modifiable access to the |
|
Reset this weak pointer to the empty state. If this weak pointer manages a (possibly shared) object, then decrement the number of weak references to that object. |
|
Efficiently exchange the states of this weak pointer and the specified |
|
Return a "snapshot" of the current number of shared pointers that share ownership of the object referred to by this weak pointer, or 0 if this weak pointer is in the empty state. Note that any result other than 0 may be unreliable in a multi‐threaded program, where another pointer sharing ownership in a different thread may be copied or destroyed, or another weak pointer may be locked in the case that 1 is returned (that would otherwise indicate unique ownership). |
|
Nested trait declaration for |
Deduction Guides
Name |
Description |
Deduce the specified type |
Friends
Name |
Description |
|
This |