shared_ptr Class Template Reference
List of all members.
Public Types
Public Member Functions
-
_Tp * get () const
-
operator __unspecified_bool_type () const
-
_Reference operator* () const
-
_Tp * operator-> () const
-
template<typename _Tp1 > shared_ptr & operator= (std::auto_ptr< _Tp1 > &__r)
-
template<typename _Tp1 > shared_ptr & operator= (const shared_ptr< _Tp1 > &__r)
-
template<typename _Tp1 , typename _Deleter > void reset (_Tp1 *__p, _Deleter __d)
-
template<typename _Tp1 > void reset (_Tp1 *__p)
-
void reset ()
-
template<typename _Tp1 > shared_ptr (const shared_ptr< _Tp1 > &__r, __dynamic_cast_tag)
-
template<typename _Tp1 > shared_ptr (const shared_ptr< _Tp1 > &__r, __const_cast_tag)
-
template<typename _Tp1 > shared_ptr (const shared_ptr< _Tp1 > &__r, __static_cast_tag)
- template<typename _Tp1 > shared_ptr (std::auto_ptr< _Tp1 > &__r)
- template<typename _Tp1 > shared_ptr (const weak_ptr< _Tp1 > &__r)
- template<typename _Tp1 > shared_ptr (const shared_ptr< _Tp1 > &__r)
- template<typename _Tp1 , typename _Deleter > shared_ptr (_Tp1 *__p, _Deleter __d)
- template<typename _Tp1 > shared_ptr (_Tp1 *__p)
- shared_ptr ()
-
void swap (shared_ptr< _Tp > &__other)
-
bool unique () const
-
long use_count () const
Friends
-
template<typename _Del , typename _Tp1 > _Del * get_deleter (const shared_ptr< _Tp1 > &)
-
template<typename _Tp1 > bool operator!= (const shared_ptr &__a, const shared_ptr< _Tp1 > &__b)
-
template<typename _Tp1 > bool operator< (const shared_ptr &__a, const shared_ptr< _Tp1 > &__b)
-
template<typename _Tp1 > bool operator== (const shared_ptr &__a, const shared_ptr< _Tp1 > &__b)
-
class shared_ptr
-
class weak_ptr
Detailed Description
template<typename _Tp>
class std::tr1::shared_ptr< _Tp >
A smart pointer with reference-counted copy semantics. The object pointed to is deleted when the last
shared_ptr pointing to it is destroyed or reset.
Definition at line 485 of file boost_shared_ptr.h.
Constructor & Destructor Documentation
Construct an empty shared_ptr.
- Postcondition:
- use_count()==0 && get()==0
Definition at line 496 of file boost_shared_ptr.h.
Construct a shared_ptr that owns the pointer p.
- Parameters:
-
| p | A pointer that is convertible to element_type*. |
- Postcondition:
- use_count() == 1 && get() == p
- Exceptions:
-
Definition at line 506 of file boost_shared_ptr.h.
Construct a shared_ptr that owns the pointer p and the deleter d.
- Parameters:
-
| p | A pointer. |
| d | A deleter. |
- Postcondition:
- use_count() == 1 && get() == p
- Exceptions:
-
Definition at line 528 of file boost_shared_ptr.h.
If r is empty, constructs an empty shared_ptr; otherwise construct a shared_ptr that shares ownership with r.
- Parameters:
-
- Postcondition:
- get() == r.get() && use_count() == r.use_count()
- Exceptions:
-
Definition at line 546 of file boost_shared_ptr.h.
shared_ptr |
( |
const weak_ptr< _Tp1 > & |
__r |
) |
[inline, explicit] |
Constructs a shared_ptr that shares ownership with r and stores a copy of the pointer stored in r.
- Parameters:
-
- Postcondition:
- use_count() == r.use_count()
- Exceptions:
-
| bad_weak_ptr | when r.expired(), in which case the constructor has no effect. |
Definition at line 560 of file boost_shared_ptr.h.
The documentation for this class was generated from the following file: