libstdc++
Pointer Abstractions
Collaboration diagram for Pointer Abstractions:

Classes

struct  std::default_delete< _Tp >
 
struct  std::default_delete< _Tp[]>
 
class  std::enable_shared_from_this< _Tp >
 
struct  std::hash< shared_ptr< _Tp > >
 
struct  std::hash< unique_ptr< _Tp, _Dp > >
 
struct  std::owner_less< _Tp >
 
struct  std::owner_less< shared_ptr< _Tp > >
 
struct  std::owner_less< weak_ptr< _Tp > >
 
struct  std::pointer_traits< _Ptr >
 
struct  std::pointer_traits< _Tp * >
 
class  std::shared_ptr< _Tp >
 
class  std::unique_ptr< _Tp, _Dp >
 
class  std::unique_ptr< _Tp[], _Dp >
 
class  std::weak_ptr< _Tp >
 

Functions

template<typename _Tp , typename _Alloc , typename... _Args>
shared_ptr< _Tp > std::allocate_shared (const _Alloc &__a, _Args &&...__args)
 
template<typename _Tp , typename _Tp1 >
shared_ptr< _Tp > std::const_pointer_cast (const shared_ptr< _Tp1 > &__r) noexcept
 
template<typename _Tp , typename _Tp1 >
shared_ptr< _Tp > std::dynamic_pointer_cast (const shared_ptr< _Tp1 > &__r) noexcept
 
template<typename _Del , typename _Tp , _Lock_policy _Lp>
_Del * std::get_deleter (const __shared_ptr< _Tp, _Lp > &__p) noexcept
 
template<typename _Tp , typename... _Args>
shared_ptr< _Tp > std::make_shared (_Args &&...__args)
 
template<typename _Tp1 , typename _Tp2 >
bool std::operator!= (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
 
template<typename _Tp >
bool std::operator!= (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
 
template<typename _Tp >
bool std::operator!= (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
 
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
bool std::operator!= (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
 
template<typename _Tp , typename _Dp >
bool std::operator!= (const unique_ptr< _Tp, _Dp > &__x, nullptr_t) noexcept
 
template<typename _Tp , typename _Dp >
bool std::operator!= (nullptr_t, const unique_ptr< _Tp, _Dp > &__x) noexcept
 
template<typename _Tp1 , typename _Tp2 >
bool std::operator< (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
 
template<typename _Tp >
bool std::operator< (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
 
template<typename _Tp >
bool std::operator< (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
 
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
bool std::operator< (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
 
template<typename _Tp , typename _Dp >
bool std::operator< (const unique_ptr< _Tp, _Dp > &__x, nullptr_t)
 
template<typename _Tp , typename _Dp >
bool std::operator< (nullptr_t, const unique_ptr< _Tp, _Dp > &__x)
 
template<typename _Ch , typename _Tr , typename _Tp , _Lock_policy _Lp>
std::basic_ostream< _Ch, _Tr > & std::operator<< (std::basic_ostream< _Ch, _Tr > &__os, const __shared_ptr< _Tp, _Lp > &__p)
 
template<typename _Tp1 , typename _Tp2 >
bool std::operator<= (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
 
template<typename _Tp >
bool std::operator<= (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
 
template<typename _Tp >
bool std::operator<= (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
 
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
bool std::operator<= (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
 
template<typename _Tp , typename _Dp >
bool std::operator<= (const unique_ptr< _Tp, _Dp > &__x, nullptr_t)
 
template<typename _Tp , typename _Dp >
bool std::operator<= (nullptr_t, const unique_ptr< _Tp, _Dp > &__x)
 
template<typename _Tp1 , typename _Tp2 >
bool std::operator== (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
 
template<typename _Tp >
bool std::operator== (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
 
template<typename _Tp >
bool std::operator== (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
 
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
bool std::operator== (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
 
template<typename _Tp , typename _Dp >
bool std::operator== (const unique_ptr< _Tp, _Dp > &__x, nullptr_t) noexcept
 
template<typename _Tp , typename _Dp >
bool std::operator== (nullptr_t, const unique_ptr< _Tp, _Dp > &__x) noexcept
 
template<typename _Tp1 , typename _Tp2 >
bool std::operator> (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
 
template<typename _Tp >
bool std::operator> (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
 
template<typename _Tp >
bool std::operator> (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
 
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
bool std::operator> (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
 
template<typename _Tp , typename _Dp >
bool std::operator> (const unique_ptr< _Tp, _Dp > &__x, nullptr_t)
 
template<typename _Tp , typename _Dp >
bool std::operator> (nullptr_t, const unique_ptr< _Tp, _Dp > &__x)
 
template<typename _Tp1 , typename _Tp2 >
bool std::operator>= (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
 
template<typename _Tp >
bool std::operator>= (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
 
template<typename _Tp >
bool std::operator>= (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
 
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
bool std::operator>= (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
 
template<typename _Tp , typename _Dp >
bool std::operator>= (const unique_ptr< _Tp, _Dp > &__x, nullptr_t)
 
template<typename _Tp , typename _Dp >
bool std::operator>= (nullptr_t, const unique_ptr< _Tp, _Dp > &__x)
 
template<typename _Tp , typename _Tp1 >
shared_ptr< _Tp > std::static_pointer_cast (const shared_ptr< _Tp1 > &__r) noexcept
 
template<typename _Tp >
void std::swap (shared_ptr< _Tp > &__a, shared_ptr< _Tp > &__b) noexcept
 
template<typename _Tp >
void std::swap (weak_ptr< _Tp > &__a, weak_ptr< _Tp > &__b) noexcept
 
template<typename _Tp , typename _Dp >
void std::swap (unique_ptr< _Tp, _Dp > &__x, unique_ptr< _Tp, _Dp > &__y) noexcept
 

Detailed Description

Smart pointers, etc.

Function Documentation

template<typename _Tp , typename _Alloc , typename... _Args>
shared_ptr<_Tp> std::allocate_shared ( const _Alloc &  __a,
_Args &&...  __args 
)
inline

Create an object that is owned by a shared_ptr.

Parameters
__aAn allocator.
__argsArguments for the _Tp object's constructor.
Returns
A shared_ptr that owns the newly created object.
Exceptions
Anexception thrown from _Alloc::allocate or from the constructor of _Tp.

A copy of __a will be used to allocate memory for the shared_ptr and the new object.

Definition at line 585 of file shared_ptr.h.

template<typename _Del , typename _Tp , _Lock_policy _Lp>
_Del* std::get_deleter ( const __shared_ptr< _Tp, _Lp > &  __p)
inlinenoexcept

20.7.2.2.10 shared_ptr get_deleter

Definition at line 76 of file shared_ptr.h.

template<typename _Tp , typename... _Args>
shared_ptr<_Tp> std::make_shared ( _Args &&...  __args)
inline

Create an object that is owned by a shared_ptr.

Parameters
__argsArguments for the _Tp object's constructor.
Returns
A shared_ptr that owns the newly created object.
Exceptions
std::bad_alloc,oran exception thrown from the constructor of _Tp.

Definition at line 600 of file shared_ptr.h.

template<typename _Ch , typename _Tr , typename _Tp , _Lock_policy _Lp>
std::basic_ostream<_Ch, _Tr>& std::operator<< ( std::basic_ostream< _Ch, _Tr > &  __os,
const __shared_ptr< _Tp, _Lp > &  __p 
)
inline

20.7.2.2.11 shared_ptr I/O

Definition at line 66 of file shared_ptr.h.