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 >
 

Macros

#define __cpp_lib_make_unique
 

Typedefs

typedef unique_ptr< _Tp[]> std::_MakeUniq< _Tp[]>::__array
 
template<typename _Up >
using std::unique_ptr< _Tp[], _Dp >::__safe_conversion_raw = __and_< __or_< __or_< is_same< _Up, pointer >, is_same< _Up, nullptr_t > >, __and_< is_pointer< _Up >, is_same< pointer, element_type * >, is_convertible< typename remove_pointer< _Up >::type(*)[], element_type(*)[]> > > >
 
template<typename _Up , typename _Ep >
using std::unique_ptr< _Tp, _Dp >::__safe_conversion_up = __and_< is_convertible< typename unique_ptr< _Up, _Ep >::pointer, pointer >, __not_< is_array< _Up > >, __or_< __and_< is_reference< deleter_type >, is_same< deleter_type, _Ep > >, __and_< __not_< is_reference< deleter_type > >, is_convertible< _Ep, deleter_type > > > >
 
template<typename _Up , typename _Ep , typename _Up_up = unique_ptr<_Up, _Ep>, typename _Up_element_type = typename _Up_up::element_type>
using std::unique_ptr< _Tp[], _Dp >::__safe_conversion_up = __and_< is_array< _Up >, is_same< pointer, element_type * >, is_same< typename _Up_up::pointer, _Up_element_type * >, is_convertible< _Up_element_type(*)[], element_type(*)[]>, __or_< __and_< is_reference< deleter_type >, is_same< deleter_type, _Ep > >, __and_< __not_< is_reference< deleter_type > >, is_convertible< _Ep, deleter_type > > > >
 
typedef unique_ptr< _Tp > std::_MakeUniq< _Tp >::__single_object
 
typedef _Dp std::unique_ptr< _Tp, _Dp >::deleter_type
 
typedef _Dp std::unique_ptr< _Tp[], _Dp >::deleter_type
 
typedef _Tp std::unique_ptr< _Tp, _Dp >::element_type
 
typedef _Tp std::unique_ptr< _Tp[], _Dp >::element_type
 
typedef _Pointer::type std::unique_ptr< _Tp, _Dp >::pointer
 
typedef _Pointer::type std::unique_ptr< _Tp[], _Dp >::pointer
 
typedef decltype(__test< _Del >(0)) std::unique_ptr< _Tp, _Dp >::_Pointer::type
 
typedef decltype(__test< _Del >(0)) std::unique_ptr< _Tp[], _Dp >::_Pointer::type
 

Functions

 std::_Sp_locker::_Sp_locker (const _Sp_locker &)=delete
 
 std::_Sp_locker::_Sp_locker (const void *) noexcept
 
 std::_Sp_locker::_Sp_locker (const void *, const void *) noexcept
 
constexpr std::default_delete< _Tp >::default_delete () noexcept=default
 
constexpr std::default_delete< _Tp[]>::default_delete () noexcept=default
 
template<typename _Up , typename = typename enable_if<is_convertible<_Up*, _Tp*>::value>::type>
 std::default_delete< _Tp >::default_delete (const default_delete< _Up > &) noexcept
 
template<typename _Up , typename = typename enable_if<is_convertible<_Up(*)[], _Tp(*)[]>::value>::type>
 std::default_delete< _Tp[]>::default_delete (const default_delete< _Up[]> &) noexcept
 
 std::enable_shared_from_this< _Tp >::enable_shared_from_this (const enable_shared_from_this &) noexcept
 
constexpr std::shared_ptr< _Tp >::shared_ptr () noexcept
 
template<typename _Tp1 >
 std::shared_ptr< _Tp >::shared_ptr (_Tp1 *__p)
 
template<typename _Tp1 , typename _Deleter >
 std::shared_ptr< _Tp >::shared_ptr (_Tp1 *__p, _Deleter __d)
 
template<typename _Tp1 , typename _Deleter , typename _Alloc >
 std::shared_ptr< _Tp >::shared_ptr (_Tp1 *__p, _Deleter __d, _Alloc __a)
 
 std::shared_ptr< _Tp >::shared_ptr (const shared_ptr &) noexcept=default
 
template<typename _Tp1 , typename = _Convertible<_Tp1*>>
 std::shared_ptr< _Tp >::shared_ptr (const shared_ptr< _Tp1 > &__r) noexcept
 
template<typename _Tp1 >
 std::shared_ptr< _Tp >::shared_ptr (const shared_ptr< _Tp1 > &__r, _Tp *__p) noexcept
 
template<typename _Tp1 >
 std::shared_ptr< _Tp >::shared_ptr (const weak_ptr< _Tp1 > &__r)
 
template<typename _Deleter >
 std::shared_ptr< _Tp >::shared_ptr (nullptr_t __p, _Deleter __d)
 
template<typename _Deleter , typename _Alloc >
 std::shared_ptr< _Tp >::shared_ptr (nullptr_t __p, _Deleter __d, _Alloc __a)
 
constexpr std::shared_ptr< _Tp >::shared_ptr (nullptr_t) noexcept
 
 std::shared_ptr< _Tp >::shared_ptr (shared_ptr &&__r) noexcept
 
template<typename _Tp1 , typename = _Convertible<_Tp1*>>
 std::shared_ptr< _Tp >::shared_ptr (shared_ptr< _Tp1 > &&__r) noexcept
 
template<typename _Tp1 , typename _Del , typename = _Convertible<typename unique_ptr<_Tp1, _Del>::pointer>>
 std::shared_ptr< _Tp >::shared_ptr (std::unique_ptr< _Tp1, _Del > &&__r)
 
constexpr std::unique_ptr< _Tp, _Dp >::unique_ptr () noexcept
 
constexpr std::unique_ptr< _Tp[], _Dp >::unique_ptr () noexcept
 
template<typename _Up , typename = typename enable_if< __safe_conversion_raw<_Up>::value, bool>::type>
 std::unique_ptr< _Tp[], _Dp >::unique_ptr (_Up __p) noexcept
 
template<typename _Up , typename = typename enable_if< __safe_conversion_raw<_Up>::value, bool>::type>
 std::unique_ptr< _Tp[], _Dp >::unique_ptr (_Up __p, typename conditional< is_reference< deleter_type >::value, deleter_type, const deleter_type & >::type __d) noexcept
 
template<typename _Up , typename = typename enable_if< __safe_conversion_raw<_Up>::value, bool>::type>
 std::unique_ptr< _Tp[], _Dp >::unique_ptr (_Up __p, typename remove_reference< deleter_type >::type &&__d) noexcept
 
 std::unique_ptr< _Tp, _Dp >::unique_ptr (const unique_ptr &)=delete
 
 std::unique_ptr< _Tp[], _Dp >::unique_ptr (const unique_ptr &)=delete
 
constexpr std::unique_ptr< _Tp, _Dp >::unique_ptr (nullptr_t) noexcept
 
constexpr std::unique_ptr< _Tp[], _Dp >::unique_ptr (nullptr_t) noexcept
 
 std::unique_ptr< _Tp, _Dp >::unique_ptr (pointer __p) noexcept
 
 std::unique_ptr< _Tp, _Dp >::unique_ptr (pointer __p, typename conditional< is_reference< deleter_type >::value, deleter_type, const deleter_type & >::type __d) noexcept
 
 std::unique_ptr< _Tp, _Dp >::unique_ptr (pointer __p, typename remove_reference< deleter_type >::type &&__d) noexcept
 
 std::unique_ptr< _Tp, _Dp >::unique_ptr (unique_ptr &&__u) noexcept
 
 std::unique_ptr< _Tp[], _Dp >::unique_ptr (unique_ptr &&__u) noexcept
 
template<typename _Up , typename _Ep , typename = _Require< __safe_conversion_up<_Up, _Ep>, typename conditional<is_reference<_Dp>::value, is_same<_Ep, _Dp>, is_convertible<_Ep, _Dp>>::type>>
 std::unique_ptr< _Tp, _Dp >::unique_ptr (unique_ptr< _Up, _Ep > &&__u) noexcept
 
template<typename _Up , typename _Ep , typename = _Require<__safe_conversion_up<_Up, _Ep>>>
 std::unique_ptr< _Tp[], _Dp >::unique_ptr (unique_ptr< _Up, _Ep > &&__u) noexcept
 
template<typename _Tp1 , typename = _Convertible<_Tp1*>>
 std::weak_ptr< _Tp >::weak_ptr (const shared_ptr< _Tp1 > &__r) noexcept
 
 std::weak_ptr< _Tp >::weak_ptr (const weak_ptr &) noexcept=default
 
template<typename _Tp1 , typename = _Convertible<_Tp1*>>
 std::weak_ptr< _Tp >::weak_ptr (const weak_ptr< _Tp1 > &__r) noexcept
 
 std::weak_ptr< _Tp >::weak_ptr (weak_ptr &&) noexcept=default
 
template<typename _Tp1 , typename = _Convertible<_Tp1*>>
 std::weak_ptr< _Tp >::weak_ptr (weak_ptr< _Tp1 > &&__r) noexcept
 
 std::unique_ptr< _Tp[], _Dp >::~unique_ptr ()
 
 std::unique_ptr< _Tp, _Dp >::~unique_ptr () noexcept
 
template<typename _Tp1 , typename _Tp2 >
void std::__enable_shared_from_this_helper (const __shared_count<> &__pn, const enable_shared_from_this< _Tp1 > *__pe, const _Tp2 *__px) noexcept
 
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
 
pointer std::unique_ptr< _Tp, _Dp >::get () const noexcept
 
pointer std::unique_ptr< _Tp[], _Dp >::get () const noexcept
 
const deleter_type & std::unique_ptr< _Tp, _Dp >::get_deleter () const noexcept
 
const deleter_type & std::unique_ptr< _Tp[], _Dp >::get_deleter () const noexcept
 
deleter_type & std::unique_ptr< _Tp, _Dp >::get_deleter () noexcept
 
deleter_type & std::unique_ptr< _Tp[], _Dp >::get_deleter () noexcept
 
template<typename _Del , typename _Tp , _Lock_policy _Lp>
_Del * std::get_deleter (const __shared_ptr< _Tp, _Lp > &__p) noexcept
 
shared_ptr< _Tp > std::weak_ptr< _Tp >::lock () const noexcept
 
template<typename _Tp , typename... _Args>
shared_ptr< _Tp > std::make_shared (_Args &&... __args)
 
template<typename _Tp , typename... _Args>
_MakeUniq< _Tp >::__single_object std::make_unique (_Args &&... __args)
 
template<typename _Tp , typename... _Args>
_MakeUniq< _Tp >::__invalid_type std::make_unique (_Args &&...)=delete
 
template<typename _Tp >
_MakeUniq< _Tp >::__array std::make_unique (size_t __num)
 
 std::unique_ptr< _Tp, _Dp >::operator bool () const noexcept
 
 std::unique_ptr< _Tp[], _Dp >::operator bool () const noexcept
 
template<typename _Tp >
bool std::operator!= (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 >
bool std::operator!= (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) 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 >
bool std::operator!= (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
 
template<typename _Tp , typename _Dp >
bool std::operator!= (nullptr_t, const unique_ptr< _Tp, _Dp > &__x) noexcept
 
void std::default_delete< _Tp >::operator() (_Tp *__ptr) const
 
template<typename _Up >
enable_if< is_convertible< _Up(*)[], _Tp(*)[]>::value >::type std::default_delete< _Tp[]>::operator() (_Up *__ptr) const
 
size_t std::hash< shared_ptr< _Tp > >::operator() (const shared_ptr< _Tp > &__s) const noexcept
 
size_t std::hash< unique_ptr< _Tp, _Dp > >::operator() (const unique_ptr< _Tp, _Dp > &__u) const noexcept
 
add_lvalue_reference< element_type >::type std::unique_ptr< _Tp, _Dp >::operator* () const
 
pointer std::unique_ptr< _Tp, _Dp >::operator-> () const noexcept
 
template<typename _Tp >
bool std::operator< (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 >
bool std::operator< (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) 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 >
bool std::operator< (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
 
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 _Tp >
bool std::operator<= (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 >
bool std::operator<= (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) 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 >
bool std::operator<= (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
 
template<typename _Tp , typename _Dp >
bool std::operator<= (nullptr_t, const unique_ptr< _Tp, _Dp > &__x)
 
_Sp_locker & std::_Sp_locker::operator= (const _Sp_locker &)=delete
 
enable_shared_from_thisstd::enable_shared_from_this< _Tp >::operator= (const enable_shared_from_this &) noexcept
 
shared_ptrstd::shared_ptr< _Tp >::operator= (const shared_ptr &) noexcept=default
 
template<typename _Tp1 >
shared_ptrstd::shared_ptr< _Tp >::operator= (const shared_ptr< _Tp1 > &__r) noexcept
 
template<typename _Tp1 >
weak_ptrstd::weak_ptr< _Tp >::operator= (const shared_ptr< _Tp1 > &__r) noexcept
 
unique_ptrstd::unique_ptr< _Tp, _Dp >::operator= (const unique_ptr &)=delete
 
unique_ptrstd::unique_ptr< _Tp[], _Dp >::operator= (const unique_ptr &)=delete
 
weak_ptrstd::weak_ptr< _Tp >::operator= (const weak_ptr &__r) noexcept=default
 
template<typename _Tp1 >
weak_ptrstd::weak_ptr< _Tp >::operator= (const weak_ptr< _Tp1 > &__r) noexcept
 
unique_ptrstd::unique_ptr< _Tp, _Dp >::operator= (nullptr_t) noexcept
 
unique_ptrstd::unique_ptr< _Tp[], _Dp >::operator= (nullptr_t) noexcept
 
shared_ptrstd::shared_ptr< _Tp >::operator= (shared_ptr &&__r) noexcept
 
template<class _Tp1 >
shared_ptrstd::shared_ptr< _Tp >::operator= (shared_ptr< _Tp1 > &&__r) noexcept
 
template<typename _Tp1 , typename _Del >
shared_ptrstd::shared_ptr< _Tp >::operator= (std::unique_ptr< _Tp1, _Del > &&__r)
 
unique_ptrstd::unique_ptr< _Tp, _Dp >::operator= (unique_ptr &&__u) noexcept
 
unique_ptrstd::unique_ptr< _Tp[], _Dp >::operator= (unique_ptr &&__u) noexcept
 
template<typename _Up , typename _Ep >
enable_if< __and_< __safe_conversion_up< _Up, _Ep >, is_assignable< deleter_type &, _Ep && > >::value, unique_ptr & >::type std::unique_ptr< _Tp, _Dp >::operator= (unique_ptr< _Up, _Ep > &&__u) noexcept
 
template<typename _Up , typename _Ep >
enable_if< __and_< __safe_conversion_up< _Up, _Ep >, is_assignable< deleter_type &, _Ep && > >::value, unique_ptr & >::type std::unique_ptr< _Tp[], _Dp >::operator= (unique_ptr< _Up, _Ep > &&__u) noexcept
 
weak_ptrstd::weak_ptr< _Tp >::operator= (weak_ptr &&__r) noexcept=default
 
template<typename _Tp1 >
weak_ptrstd::weak_ptr< _Tp >::operator= (weak_ptr< _Tp1 > &&__r) noexcept
 
template<typename _Tp >
bool std::operator== (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 >
bool std::operator== (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) 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 >
bool std::operator== (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
 
template<typename _Tp , typename _Dp >
bool std::operator== (nullptr_t, const unique_ptr< _Tp, _Dp > &__x) noexcept
 
template<typename _Tp >
bool std::operator> (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 >
bool std::operator> (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) 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 >
bool std::operator> (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
 
template<typename _Tp , typename _Dp >
bool std::operator> (nullptr_t, const unique_ptr< _Tp, _Dp > &__x)
 
template<typename _Tp >
bool std::operator>= (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 >
bool std::operator>= (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) 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 >
bool std::operator>= (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
 
template<typename _Tp , typename _Dp >
bool std::operator>= (nullptr_t, const unique_ptr< _Tp, _Dp > &__x)
 
std::add_lvalue_reference< element_type >::type std::unique_ptr< _Tp[], _Dp >::operator[] (size_t __i) const
 
pointer std::unique_ptr< _Tp, _Dp >::release () noexcept
 
pointer std::unique_ptr< _Tp[], _Dp >::release () noexcept
 
template<typename _Up , typename = _Require< __or_<is_same<_Up, pointer>, __and_<is_same<pointer, element_type*>, is_pointer<_Up>, is_convertible< typename remove_pointer<_Up>::type(*)[], element_type(*)[] > > > >>
void std::unique_ptr< _Tp[], _Dp >::reset (_Up __p) noexcept
 
void std::unique_ptr< _Tp[], _Dp >::reset (nullptr_t=nullptr) noexcept
 
void std::unique_ptr< _Tp, _Dp >::reset (pointer __p=pointer()) noexcept
 
shared_ptr< _Tp > std::enable_shared_from_this< _Tp >::shared_from_this ()
 
shared_ptr< const _Tp > std::enable_shared_from_this< _Tp >::shared_from_this () const
 
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
 
void std::unique_ptr< _Tp, _Dp >::swap (unique_ptr &__u) noexcept
 
void std::unique_ptr< _Tp[], _Dp >::swap (unique_ptr &__u) noexcept
 
template<typename _Tp , typename _Dp >
void std::swap (unique_ptr< _Tp, _Dp > &__x, unique_ptr< _Tp, _Dp > &__y) noexcept
 
template<typename _Tp >
void std::swap (weak_ptr< _Tp > &__a, weak_ptr< _Tp > &__b) noexcept
 

Friends

template<typename _Tp1 , typename _Tp2 >
void std::enable_shared_from_this< _Tp >::__enable_shared_from_this_helper (const __shared_count<> &, const enable_shared_from_this< _Tp1 > *, const _Tp2 *) noexcept
 
template<typename _Tp1 , typename _Alloc , typename... _Args>
shared_ptr< _Tp1std::shared_ptr< _Tp >::allocate_shared (const _Alloc &__a, _Args &&... __args)
 
class std::shared_ptr< _Tp >::weak_ptr< _Tp >
 
template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_is_lock_free (const __shared_ptr< _Tp, _Lp > *__p)
 
template<typename _Tp >
bool std::atomic_is_lock_free (const shared_ptr< _Tp > *__p)
 
template<typename _Tp >
shared_ptr< _Tp > std::atomic_load_explicit (const shared_ptr< _Tp > *__p, memory_order)
 
template<typename _Tp >
shared_ptr< _Tp > std::atomic_load (const shared_ptr< _Tp > *__p)
 
template<typename _Tp , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::atomic_load_explicit (const __shared_ptr< _Tp, _Lp > *__p, memory_order)
 
template<typename _Tp , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::atomic_load (const __shared_ptr< _Tp, _Lp > *__p)
 
template<typename _Tp >
void std::atomic_store_explicit (shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r, memory_order)
 
template<typename _Tp >
void std::atomic_store (shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r)
 
template<typename _Tp , _Lock_policy _Lp>
void std::atomic_store_explicit (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > __r, memory_order)
 
template<typename _Tp , _Lock_policy _Lp>
void std::atomic_store (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > __r)
 
template<typename _Tp >
shared_ptr< _Tp > std::atomic_exchange_explicit (shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r, memory_order)
 
template<typename _Tp >
shared_ptr< _Tp > std::atomic_exchange (shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r)
 
template<typename _Tp , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::atomic_exchange_explicit (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > __r, memory_order)
 
template<typename _Tp , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::atomic_exchange (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > __r)
 
template<typename _Tp >
bool std::atomic_compare_exchange_strong_explicit (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w, memory_order, memory_order)
 
template<typename _Tp >
bool std::atomic_compare_exchange_strong (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w)
 
template<typename _Tp >
bool std::atomic_compare_exchange_weak_explicit (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w, memory_order __success, memory_order __failure)
 
template<typename _Tp >
bool std::atomic_compare_exchange_weak (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w)
 
template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_compare_exchange_strong_explicit (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > *__v, __shared_ptr< _Tp, _Lp > __w, memory_order, memory_order)
 
template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_compare_exchange_strong (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > *__v, __shared_ptr< _Tp, _Lp > __w)
 
template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_compare_exchange_weak_explicit (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > *__v, __shared_ptr< _Tp, _Lp > __w, memory_order __success, memory_order __failure)
 
template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_compare_exchange_weak (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > *__v, __shared_ptr< _Tp, _Lp > __w)
 

Detailed Description

Smart pointers, etc.

Macro Definition Documentation

◆ __cpp_lib_make_unique

#define __cpp_lib_make_unique

Definition at line 777 of file unique_ptr.h.

Typedef Documentation

◆ __array

template<typename _Tp >
typedef unique_ptr<_Tp[]> std::_MakeUniq< _Tp[]>::__array

Definition at line 785 of file unique_ptr.h.

◆ __safe_conversion_raw

template<typename _Tp , typename _Dp >
template<typename _Up >
using std::unique_ptr< _Tp[], _Dp >::__safe_conversion_raw = __and_< __or_<__or_<is_same<_Up, pointer>, is_same<_Up, nullptr_t> >, __and_<is_pointer<_Up>, is_same<pointer, element_type*>, is_convertible< typename remove_pointer<_Up>::type(*)[], element_type(*)[]> > > >

Definition at line 422 of file unique_ptr.h.

◆ __safe_conversion_up [1/2]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
template<typename _Up , typename _Ep >
using std::unique_ptr< _Tp, _Dp >::__safe_conversion_up = __and_< is_convertible<typename unique_ptr<_Up, _Ep>::pointer, pointer>, __not_<is_array<_Up> >, __or_<__and_<is_reference<deleter_type>, is_same<deleter_type, _Ep> >, __and_<__not_<is_reference<deleter_type> >, is_convertible<_Ep, deleter_type> > > >

Definition at line 145 of file unique_ptr.h.

◆ __safe_conversion_up [2/2]

template<typename _Tp , typename _Dp >
template<typename _Up , typename _Ep , typename _Up_up = unique_ptr<_Up, _Ep>, typename _Up_element_type = typename _Up_up::element_type>
using std::unique_ptr< _Tp[], _Dp >::__safe_conversion_up = __and_< is_array<_Up>, is_same<pointer, element_type*>, is_same<typename _Up_up::pointer, _Up_element_type*>, is_convertible<_Up_element_type(*)[], element_type(*)[]>, __or_<__and_<is_reference<deleter_type>, is_same<deleter_type, _Ep> >, __and_<__not_<is_reference<deleter_type> >, is_convertible<_Ep, deleter_type> >> >

Definition at line 410 of file unique_ptr.h.

◆ __single_object

template<typename _Tp >
typedef unique_ptr<_Tp> std::_MakeUniq< _Tp >::__single_object

Definition at line 781 of file unique_ptr.h.

◆ deleter_type [1/2]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
typedef _Dp std::unique_ptr< _Tp, _Dp >::deleter_type

Definition at line 139 of file unique_ptr.h.

◆ deleter_type [2/2]

template<typename _Tp , typename _Dp >
typedef _Dp std::unique_ptr< _Tp[], _Dp >::deleter_type

Definition at line 403 of file unique_ptr.h.

◆ element_type [1/2]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
typedef _Tp std::unique_ptr< _Tp, _Dp >::element_type

Definition at line 138 of file unique_ptr.h.

◆ element_type [2/2]

template<typename _Tp , typename _Dp >
typedef _Tp std::unique_ptr< _Tp[], _Dp >::element_type

Definition at line 402 of file unique_ptr.h.

◆ pointer [1/2]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
typedef _Pointer::type std::unique_ptr< _Tp, _Dp >::pointer

Definition at line 137 of file unique_ptr.h.

◆ pointer [2/2]

template<typename _Tp , typename _Dp >
typedef _Pointer::type std::unique_ptr< _Tp[], _Dp >::pointer

Definition at line 401 of file unique_ptr.h.

◆ type [1/2]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
typedef decltype(__test<_Del>(0)) std::unique_ptr< _Tp, _Dp >::_Pointer::type

Definition at line 130 of file unique_ptr.h.

◆ type [2/2]

template<typename _Tp , typename _Dp >
typedef decltype(__test<_Del>(0)) std::unique_ptr< _Tp[], _Dp >::_Pointer::type

Definition at line 384 of file unique_ptr.h.

Function Documentation

◆ default_delete() [1/4]

template<typename _Tp >
constexpr std::default_delete< _Tp >::default_delete ( )
constexprdefaultnoexcept

Default constructor.

◆ default_delete() [2/4]

template<typename _Tp >
constexpr std::default_delete< _Tp[]>::default_delete ( )
constexprdefaultnoexcept

Default constructor.

◆ default_delete() [3/4]

template<typename _Tp >
template<typename _Up , typename = typename enable_if<is_convertible<_Up*, _Tp*>::value>::type>
std::default_delete< _Tp >::default_delete ( const default_delete< _Up > &  )
inlinenoexcept

Converting constructor.

Allows conversion from a deleter for arrays of another type, _Up, only if _Up* is convertible to _Tp*.

Definition at line 66 of file unique_ptr.h.

◆ default_delete() [4/4]

template<typename _Tp >
template<typename _Up , typename = typename enable_if<is_convertible<_Up(*)[], _Tp(*)[]>::value>::type>
std::default_delete< _Tp[]>::default_delete ( const default_delete< _Up[]> &  )
inlinenoexcept

Converting constructor.

Allows conversion from a deleter for arrays of another type, such as a const-qualified version of _Tp.

Conversions from types derived from _Tp are not allowed because it is unsafe to delete[] an array of derived types through a pointer to the base type.

Definition at line 101 of file unique_ptr.h.

◆ enable_shared_from_this() [1/2]

template<typename _Tp >
constexpr std::enable_shared_from_this< _Tp >::enable_shared_from_this ( )
inlineconstexprprotectednoexcept

Definition at line 560 of file bits/shared_ptr.h.

◆ enable_shared_from_this() [2/2]

template<typename _Tp >
std::enable_shared_from_this< _Tp >::enable_shared_from_this ( const enable_shared_from_this< _Tp > &  )
inlineprotectednoexcept

Definition at line 562 of file bits/shared_ptr.h.

◆ shared_ptr() [1/13]

template<typename _Tp >
constexpr std::shared_ptr< _Tp >::shared_ptr ( )
inlineconstexprnoexcept

Construct an empty shared_ptr.

Postcondition
use_count()==0 && get()==0

Definition at line 104 of file bits/shared_ptr.h.

◆ shared_ptr() [2/13]

template<typename _Tp >
template<typename _Tp1 >
std::shared_ptr< _Tp >::shared_ptr ( _Tp1 __p)
inlineexplicit

Construct a shared_ptr that owns the pointer __p.

Parameters
__pA pointer that is convertible to element_type*.
Postcondition
use_count() == 1 && get() == __p
Exceptions
std::bad_alloc,inwhich case delete __p is called.

Definition at line 116 of file bits/shared_ptr.h.

◆ shared_ptr() [3/13]

template<typename _Tp >
template<typename _Tp1 , typename _Deleter >
std::shared_ptr< _Tp >::shared_ptr ( _Tp1 __p,
_Deleter  __d 
)
inline

Construct a shared_ptr that owns the pointer __p and the deleter __d.

Parameters
__pA pointer.
__dA deleter.
Postcondition
use_count() == 1 && get() == __p
Exceptions
std::bad_alloc,inwhich case __d(__p) is called.

Requirements: _Deleter's copy constructor and destructor must not throw

__shared_ptr will release __p by calling __d(__p)

Definition at line 133 of file bits/shared_ptr.h.

◆ shared_ptr() [4/13]

template<typename _Tp >
template<typename _Tp1 , typename _Deleter , typename _Alloc >
std::shared_ptr< _Tp >::shared_ptr ( _Tp1 __p,
_Deleter  __d,
_Alloc  __a 
)
inline

Construct a shared_ptr that owns the pointer __p and the deleter __d.

Parameters
__pA pointer.
__dA deleter.
__aAn allocator.
Postcondition
use_count() == 1 && get() == __p
Exceptions
std::bad_alloc,inwhich case __d(__p) is called.

Requirements: _Deleter's copy constructor and destructor must not throw _Alloc's copy constructor and destructor must not throw.

__shared_ptr will release __p by calling __d(__p)

Definition at line 169 of file bits/shared_ptr.h.

◆ shared_ptr() [5/13]

template<typename _Tp >
template<typename _Tp1 , typename = _Convertible<_Tp1*>>
std::shared_ptr< _Tp >::shared_ptr ( const shared_ptr< _Tp1 > &  __r)
inlinenoexcept

If __r is empty, constructs an empty shared_ptr; otherwise construct a shared_ptr that shares ownership with __r.

Parameters
__rA shared_ptr.
Postcondition
get() == __r.get() && use_count() == __r.use_count()

Definition at line 221 of file bits/shared_ptr.h.

◆ shared_ptr() [6/13]

template<typename _Tp >
template<typename _Tp1 >
std::shared_ptr< _Tp >::shared_ptr ( const shared_ptr< _Tp1 > &  __r,
_Tp *  __p 
)
inlinenoexcept

Constructs a shared_ptr instance that stores __p and shares ownership with __r.

Parameters
__rA shared_ptr.
__pA pointer that will remain valid while *__r is valid.
Postcondition
get() == __p && use_count() == __r.use_count()

This can be used to construct a shared_ptr to a sub-object of an object managed by an existing shared_ptr.

Definition at line 210 of file bits/shared_ptr.h.

◆ shared_ptr() [7/13]

template<typename _Tp >
template<typename _Tp1 >
std::shared_ptr< _Tp >::shared_ptr ( const weak_ptr< _Tp1 > &  __r)
inlineexplicit

Constructs a shared_ptr that shares ownership with __r and stores a copy of the pointer stored in __r.

Parameters
__rA weak_ptr.
Postcondition
use_count() == __r.use_count()
Exceptions
bad_weak_ptrwhen __r.expired(), in which case the constructor has no effect.

Definition at line 250 of file bits/shared_ptr.h.

◆ shared_ptr() [8/13]

template<typename _Tp >
template<typename _Deleter >
std::shared_ptr< _Tp >::shared_ptr ( nullptr_t  __p,
_Deleter  __d 
)
inline

Construct a shared_ptr that owns a null pointer and the deleter __d.

Parameters
__pA null pointer constant.
__dA deleter.
Postcondition
use_count() == 1 && get() == __p
Exceptions
std::bad_alloc,inwhich case __d(__p) is called.

Requirements: _Deleter's copy constructor and destructor must not throw

The last owner will call __d(__p)

Definition at line 150 of file bits/shared_ptr.h.

◆ shared_ptr() [9/13]

template<typename _Tp >
template<typename _Deleter , typename _Alloc >
std::shared_ptr< _Tp >::shared_ptr ( nullptr_t  __p,
_Deleter  __d,
_Alloc  __a 
)
inline

Construct a shared_ptr that owns a null pointer and the deleter __d.

Parameters
__pA null pointer constant.
__dA deleter.
__aAn allocator.
Postcondition
use_count() == 1 && get() == __p
Exceptions
std::bad_alloc,inwhich case __d(__p) is called.

Requirements: _Deleter's copy constructor and destructor must not throw _Alloc's copy constructor and destructor must not throw.

The last owner will call __d(__p)

Definition at line 188 of file bits/shared_ptr.h.

◆ shared_ptr() [10/13]

template<typename _Tp >
constexpr std::shared_ptr< _Tp >::shared_ptr ( nullptr_t  )
inlineconstexprnoexcept

Construct an empty shared_ptr.

Postcondition
use_count() == 0 && get() == nullptr

Definition at line 269 of file bits/shared_ptr.h.

◆ shared_ptr() [11/13]

template<typename _Tp >
std::shared_ptr< _Tp >::shared_ptr ( shared_ptr< _Tp > &&  __r)
inlinenoexcept

Move-constructs a shared_ptr instance from __r.

Parameters
__rA shared_ptr rvalue.
Postcondition
*this contains the old value of __r, __r is empty.

Definition at line 229 of file bits/shared_ptr.h.

◆ shared_ptr() [12/13]

template<typename _Tp >
template<typename _Tp1 , typename = _Convertible<_Tp1*>>
std::shared_ptr< _Tp >::shared_ptr ( shared_ptr< _Tp1 > &&  __r)
inlinenoexcept

Move-constructs a shared_ptr instance from __r.

Parameters
__rA shared_ptr rvalue.
Postcondition
*this contains the old value of __r, __r is empty.

Definition at line 238 of file bits/shared_ptr.h.

◆ shared_ptr() [13/13]

template<typename _Tp >
template<typename _Tp1 , typename _Del , typename = _Convertible<typename unique_ptr<_Tp1, _Del>::pointer>>
std::shared_ptr< _Tp >::shared_ptr ( std::unique_ptr< _Tp1, _Del > &&  __r)
inline

Definition at line 262 of file bits/shared_ptr.h.

◆ unique_ptr() [1/14]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
constexpr std::unique_ptr< _Tp, _Dp >::unique_ptr ( )
inlineconstexprnoexcept

Default constructor, creates a unique_ptr that owns nothing.

Definition at line 158 of file unique_ptr.h.

◆ unique_ptr() [2/14]

template<typename _Tp , typename _Dp >
constexpr std::unique_ptr< _Tp[], _Dp >::unique_ptr ( )
inlineconstexprnoexcept

Default constructor, creates a unique_ptr that owns nothing.

Definition at line 437 of file unique_ptr.h.

◆ unique_ptr() [3/14]

template<typename _Tp , typename _Dp >
template<typename _Up , typename = typename enable_if< __safe_conversion_raw<_Up>::value, bool>::type>
std::unique_ptr< _Tp[], _Dp >::unique_ptr ( _Up  __p)
inlineexplicitnoexcept

Takes ownership of a pointer.

Parameters
__pA pointer to an array of a type safely convertible to an array of element_type

The deleter will be value-initialized.

Definition at line 453 of file unique_ptr.h.

◆ unique_ptr() [4/14]

template<typename _Tp , typename _Dp >
template<typename _Up , typename = typename enable_if< __safe_conversion_raw<_Up>::value, bool>::type>
std::unique_ptr< _Tp[], _Dp >::unique_ptr ( _Up  __p,
typename conditional< is_reference< deleter_type >::value, deleter_type, const deleter_type & >::type  __d 
)
inlinenoexcept

Takes ownership of a pointer.

Parameters
__pA pointer to an array of a type safely convertible to an array of element_type
__dA reference to a deleter.

The deleter will be initialized with __d

Definition at line 469 of file unique_ptr.h.

◆ unique_ptr() [5/14]

template<typename _Tp , typename _Dp >
template<typename _Up , typename = typename enable_if< __safe_conversion_raw<_Up>::value, bool>::type>
std::unique_ptr< _Tp[], _Dp >::unique_ptr ( _Up  __p,
typename remove_reference< deleter_type >::type &&  __d 
)
inlinenoexcept

Takes ownership of a pointer.

Parameters
__pA pointer to an array of a type safely convertible to an array of element_type
__dA reference to a deleter.

The deleter will be initialized with std::move(__d)

Definition at line 485 of file unique_ptr.h.

◆ unique_ptr() [6/14]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
constexpr std::unique_ptr< _Tp, _Dp >::unique_ptr ( nullptr_t  )
inlineconstexprnoexcept

Creates a unique_ptr that owns nothing.

Definition at line 204 of file unique_ptr.h.

◆ unique_ptr() [7/14]

template<typename _Tp , typename _Dp >
constexpr std::unique_ptr< _Tp[], _Dp >::unique_ptr ( nullptr_t  )
inlineconstexprnoexcept

Creates a unique_ptr that owns nothing.

Definition at line 496 of file unique_ptr.h.

◆ unique_ptr() [8/14]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
std::unique_ptr< _Tp, _Dp >::unique_ptr ( pointer  __p)
inlineexplicitnoexcept

Takes ownership of a pointer.

Parameters
__pA pointer to an object of element_type

The deleter will be value-initialized.

Definition at line 170 of file unique_ptr.h.

◆ unique_ptr() [9/14]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
std::unique_ptr< _Tp, _Dp >::unique_ptr ( pointer  __p,
typename conditional< is_reference< deleter_type >::value, deleter_type, const deleter_type & >::type  __d 
)
inlinenoexcept

Takes ownership of a pointer.

Parameters
__pA pointer to an object of element_type
__dA reference to a deleter.

The deleter will be initialized with __d

Definition at line 185 of file unique_ptr.h.

◆ unique_ptr() [10/14]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
std::unique_ptr< _Tp, _Dp >::unique_ptr ( pointer  __p,
typename remove_reference< deleter_type >::type &&  __d 
)
inlinenoexcept

Takes ownership of a pointer.

Parameters
__pA pointer to an object of element_type
__dAn rvalue reference to a deleter.

The deleter will be initialized with std::move(__d)

Definition at line 197 of file unique_ptr.h.

◆ unique_ptr() [11/14]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
std::unique_ptr< _Tp, _Dp >::unique_ptr ( unique_ptr< _Tp, _Dp > &&  __u)
inlinenoexcept

Move constructor.

Definition at line 211 of file unique_ptr.h.

◆ unique_ptr() [12/14]

template<typename _Tp , typename _Dp >
std::unique_ptr< _Tp[], _Dp >::unique_ptr ( unique_ptr< _Tp[], _Dp > &&  __u)
inlinenoexcept

Move constructor.

Definition at line 492 of file unique_ptr.h.

◆ unique_ptr() [13/14]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
template<typename _Up , typename _Ep , typename = _Require< __safe_conversion_up<_Up, _Ep>, typename conditional<is_reference<_Dp>::value, is_same<_Ep, _Dp>, is_convertible<_Ep, _Dp>>::type>>
std::unique_ptr< _Tp, _Dp >::unique_ptr ( unique_ptr< _Up, _Ep > &&  __u)
inlinenoexcept

Converting constructor from another type.

Requires that the pointer owned by __u is convertible to the type of pointer owned by this object, __u does not own an array, and __u has a compatible deleter type.

Definition at line 225 of file unique_ptr.h.

◆ unique_ptr() [14/14]

template<typename _Tp , typename _Dp >
template<typename _Up , typename _Ep , typename = _Require<__safe_conversion_up<_Up, _Ep>>>
std::unique_ptr< _Tp[], _Dp >::unique_ptr ( unique_ptr< _Up, _Ep > &&  __u)
inlinenoexcept

Definition at line 502 of file unique_ptr.h.

◆ weak_ptr() [1/3]

template<typename _Tp >
template<typename _Tp1 , typename = _Convertible<_Tp1*>>
std::weak_ptr< _Tp >::weak_ptr ( const shared_ptr< _Tp1 > &  __r)
inlinenoexcept

Definition at line 480 of file bits/shared_ptr.h.

◆ weak_ptr() [2/3]

template<typename _Tp >
template<typename _Tp1 , typename = _Convertible<_Tp1*>>
std::weak_ptr< _Tp >::weak_ptr ( const weak_ptr< _Tp1 > &  __r)
inlinenoexcept

Definition at line 486 of file bits/shared_ptr.h.

◆ weak_ptr() [3/3]

template<typename _Tp >
template<typename _Tp1 , typename = _Convertible<_Tp1*>>
std::weak_ptr< _Tp >::weak_ptr ( weak_ptr< _Tp1 > &&  __r)
inlinenoexcept

Definition at line 492 of file bits/shared_ptr.h.

◆ ~enable_shared_from_this()

template<typename _Tp >
std::enable_shared_from_this< _Tp >::~enable_shared_from_this ( )
inlineprotected

Definition at line 568 of file bits/shared_ptr.h.

◆ ~unique_ptr() [1/2]

template<typename _Tp , typename _Dp >
std::unique_ptr< _Tp[], _Dp >::~unique_ptr ( )
inline

Destructor, invokes the deleter if the stored pointer is not null.

Definition at line 507 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::get_deleter().

◆ ~unique_ptr() [2/2]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
std::unique_ptr< _Tp, _Dp >::~unique_ptr ( )
inlinenoexcept

Destructor, invokes the deleter if the stored pointer is not null.

Definition at line 237 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::get_deleter().

◆ __enable_shared_from_this_helper()

template<typename _Tp1 , typename _Tp2 >
void std::__enable_shared_from_this_helper ( const __shared_count<> &  __pn,
const enable_shared_from_this< _Tp1 > *  __pe,
const _Tp2 *  __px 
)
inlinenoexcept

Definition at line 596 of file bits/shared_ptr.h.

◆ allocate_shared()

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 617 of file bits/shared_ptr.h.

◆ atomic_compare_exchange_strong() [1/2]

template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_compare_exchange_strong ( __shared_ptr< _Tp, _Lp > *  __p,
__shared_ptr< _Tp, _Lp > *  __v,
__shared_ptr< _Tp, _Lp __w 
)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 294 of file shared_ptr_atomic.h.

◆ atomic_compare_exchange_strong() [2/2]

template<typename _Tp >
bool std::atomic_compare_exchange_strong ( shared_ptr< _Tp > *  __p,
shared_ptr< _Tp > *  __v,
shared_ptr< _Tp >  __w 
)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 242 of file shared_ptr_atomic.h.

◆ atomic_compare_exchange_strong_explicit() [1/2]

template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_compare_exchange_strong_explicit ( __shared_ptr< _Tp, _Lp > *  __p,
__shared_ptr< _Tp, _Lp > *  __v,
__shared_ptr< _Tp, _Lp __w,
memory_order  ,
memory_order   
)

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 272 of file shared_ptr_atomic.h.

◆ atomic_compare_exchange_strong_explicit() [2/2]

template<typename _Tp >
bool std::atomic_compare_exchange_strong_explicit ( shared_ptr< _Tp > *  __p,
shared_ptr< _Tp > *  __v,
shared_ptr< _Tp >  __w,
memory_order  ,
memory_order   
)

Atomic compare-and-swap for shared_ptr objects.

Parameters
__pA non-null pointer to a shared_ptr object.
__vA non-null pointer to a shared_ptr object.
__wA non-null pointer to a shared_ptr object.
Returns
True if *__p was equivalent to *__v, false otherwise.

The memory order for failure shall not be memory_order_release or memory_order_acq_rel, or stronger than the memory order for success.

Definition at line 220 of file shared_ptr_atomic.h.

◆ atomic_compare_exchange_weak() [1/2]

template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_compare_exchange_weak ( __shared_ptr< _Tp, _Lp > *  __p,
__shared_ptr< _Tp, _Lp > *  __v,
__shared_ptr< _Tp, _Lp __w 
)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 316 of file shared_ptr_atomic.h.

◆ atomic_compare_exchange_weak() [2/2]

template<typename _Tp >
bool std::atomic_compare_exchange_weak ( shared_ptr< _Tp > *  __p,
shared_ptr< _Tp > *  __v,
shared_ptr< _Tp >  __w 
)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 263 of file shared_ptr_atomic.h.

◆ atomic_compare_exchange_weak_explicit() [1/2]

template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_compare_exchange_weak_explicit ( __shared_ptr< _Tp, _Lp > *  __p,
__shared_ptr< _Tp, _Lp > *  __v,
__shared_ptr< _Tp, _Lp __w,
memory_order  __success,
memory_order  __failure 
)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 304 of file shared_ptr_atomic.h.

◆ atomic_compare_exchange_weak_explicit() [2/2]

template<typename _Tp >
bool std::atomic_compare_exchange_weak_explicit ( shared_ptr< _Tp > *  __p,
shared_ptr< _Tp > *  __v,
shared_ptr< _Tp >  __w,
memory_order  __success,
memory_order  __failure 
)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 251 of file shared_ptr_atomic.h.

◆ atomic_exchange() [1/2]

template<typename _Tp , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lp > std::atomic_exchange ( __shared_ptr< _Tp, _Lp > *  __p,
__shared_ptr< _Tp, _Lp __r 
)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 200 of file shared_ptr_atomic.h.

◆ atomic_exchange() [2/2]

template<typename _Tp >
shared_ptr< _Tp > std::atomic_exchange ( shared_ptr< _Tp > *  __p,
shared_ptr< _Tp >  __r 
)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 181 of file shared_ptr_atomic.h.

◆ atomic_exchange_explicit() [1/2]

template<typename _Tp , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lp > std::atomic_exchange_explicit ( __shared_ptr< _Tp, _Lp > *  __p,
__shared_ptr< _Tp, _Lp __r,
memory_order   
)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 189 of file shared_ptr_atomic.h.

◆ atomic_exchange_explicit() [2/2]

template<typename _Tp >
shared_ptr< _Tp > std::atomic_exchange_explicit ( shared_ptr< _Tp > *  __p,
shared_ptr< _Tp >  __r,
memory_order   
)
inline

Atomic exchange for shared_ptr objects.

Parameters
__pA non-null pointer to a shared_ptr object.
__rNew value to store in *__p.
Returns
The original value of *__p

Definition at line 171 of file shared_ptr_atomic.h.

◆ atomic_is_lock_free() [1/2]

template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_is_lock_free ( const __shared_ptr< _Tp, _Lp > *  __p)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 71 of file shared_ptr_atomic.h.

◆ atomic_is_lock_free() [2/2]

template<typename _Tp >
bool std::atomic_is_lock_free ( const shared_ptr< _Tp > *  __p)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 82 of file shared_ptr_atomic.h.

◆ atomic_load() [1/2]

template<typename _Tp , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lp > std::atomic_load ( const __shared_ptr< _Tp, _Lp > *  __p)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 119 of file shared_ptr_atomic.h.

◆ atomic_load() [2/2]

template<typename _Tp >
shared_ptr< _Tp > std::atomic_load ( const shared_ptr< _Tp > *  __p)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 106 of file shared_ptr_atomic.h.

◆ atomic_load_explicit() [1/2]

template<typename _Tp , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lp > std::atomic_load_explicit ( const __shared_ptr< _Tp, _Lp > *  __p,
memory_order   
)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 111 of file shared_ptr_atomic.h.

◆ atomic_load_explicit() [2/2]

template<typename _Tp >
shared_ptr< _Tp > std::atomic_load_explicit ( const shared_ptr< _Tp > *  __p,
memory_order   
)
inline

Atomic load for shared_ptr objects.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
*__p

The memory order shall not be memory_order_release or memory_order_acq_rel.

Definition at line 98 of file shared_ptr_atomic.h.

◆ atomic_store() [1/2]

template<typename _Tp , _Lock_policy _Lp>
void std::atomic_store ( __shared_ptr< _Tp, _Lp > *  __p,
__shared_ptr< _Tp, _Lp __r 
)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 158 of file shared_ptr_atomic.h.

◆ atomic_store() [2/2]

template<typename _Tp >
void std::atomic_store ( shared_ptr< _Tp > *  __p,
shared_ptr< _Tp >  __r 
)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 143 of file shared_ptr_atomic.h.

◆ atomic_store_explicit() [1/2]

template<typename _Tp , _Lock_policy _Lp>
void std::atomic_store_explicit ( __shared_ptr< _Tp, _Lp > *  __p,
__shared_ptr< _Tp, _Lp __r,
memory_order   
)
inline

Report whether shared_ptr atomic operations are lock-free.

Parameters
__pA non-null pointer to a shared_ptr object.
Returns
True if atomic access to *__p is lock-free, false otherwise.

Definition at line 148 of file shared_ptr_atomic.h.

◆ atomic_store_explicit() [2/2]

template<typename _Tp >
void std::atomic_store_explicit ( shared_ptr< _Tp > *  __p,
shared_ptr< _Tp >  __r,
memory_order   
)
inline

Atomic store for shared_ptr objects.

Parameters
__pA non-null pointer to a shared_ptr object.
__rThe value to store.

The memory order shall not be memory_order_acquire or memory_order_acq_rel.

Definition at line 134 of file shared_ptr_atomic.h.

◆ const_pointer_cast()

template<typename _Tp , typename _Tp1 >
shared_ptr< _Tp > std::const_pointer_cast ( const shared_ptr< _Tp1 > &  __r)
inlinenoexcept

Definition at line 451 of file bits/shared_ptr.h.

◆ dynamic_pointer_cast()

template<typename _Tp , typename _Tp1 >
shared_ptr< _Tp > std::dynamic_pointer_cast ( const shared_ptr< _Tp1 > &  __r)
inlinenoexcept

Definition at line 456 of file bits/shared_ptr.h.

◆ get() [1/2]

◆ get() [2/2]

template<typename _Tp , typename _Dp >
pointer std::unique_ptr< _Tp[], _Dp >::get ( ) const
inlinenoexcept

Return the stored pointer.

Definition at line 571 of file unique_ptr.h.

◆ get_deleter() [1/5]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
const deleter_type & std::unique_ptr< _Tp, _Dp >::get_deleter ( ) const
inlinenoexcept

Return a reference to the stored deleter.

Definition at line 319 of file unique_ptr.h.

◆ get_deleter() [2/5]

template<typename _Tp , typename _Dp >
const deleter_type & std::unique_ptr< _Tp[], _Dp >::get_deleter ( ) const
inlinenoexcept

Return a reference to the stored deleter.

Definition at line 581 of file unique_ptr.h.

◆ get_deleter() [3/5]

◆ get_deleter() [4/5]

template<typename _Tp , typename _Dp >
deleter_type & std::unique_ptr< _Tp[], _Dp >::get_deleter ( )
inlinenoexcept

Return a reference to the stored deleter.

Definition at line 576 of file unique_ptr.h.

◆ get_deleter() [5/5]

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 bits/shared_ptr.h.

◆ lock()

template<typename _Tp >
shared_ptr< _Tp > std::weak_ptr< _Tp >::lock ( ) const
inlinenoexcept

Definition at line 526 of file bits/shared_ptr.h.

◆ make_shared()

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 632 of file bits/shared_ptr.h.

◆ make_unique() [1/3]

template<typename _Tp , typename... _Args>
_MakeUniq< _Tp >::__single_object std::make_unique ( _Args &&...  __args)
inline

std::make_unique for single objects

Definition at line 794 of file unique_ptr.h.

◆ make_unique() [2/3]

template<typename _Tp , typename... _Args>
_MakeUniq< _Tp >::__invalid_type std::make_unique ( _Args &&  ...)
inlinedelete

Disable std::make_unique for arrays of known bound.

◆ make_unique() [3/3]

template<typename _Tp >
_MakeUniq< _Tp >::__array std::make_unique ( size_t  __num)
inline

std::make_unique for arrays of unknown bound

Definition at line 800 of file unique_ptr.h.

◆ operator bool() [1/2]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
std::unique_ptr< _Tp, _Dp >::operator bool ( ) const
inlineexplicitnoexcept

Return true if the stored pointer is not null.

Definition at line 323 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::get().

◆ operator bool() [2/2]

template<typename _Tp , typename _Dp >
std::unique_ptr< _Tp[], _Dp >::operator bool ( ) const
inlineexplicitnoexcept

Return true if the stored pointer is not null.

Definition at line 585 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::get().

◆ operator!=() [1/6]

template<typename _Tp >
bool std::operator!= ( const shared_ptr< _Tp > &  __a,
nullptr_t   
)
inlinenoexcept

Definition at line 358 of file bits/shared_ptr.h.

◆ operator!=() [2/6]

template<typename _Tp1 , typename _Tp2 >
bool std::operator!= ( const shared_ptr< _Tp1 > &  __a,
const shared_ptr< _Tp2 > &  __b 
)
inlinenoexcept

Definition at line 352 of file bits/shared_ptr.h.

◆ operator!=() [3/6]

template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
bool std::operator!= ( const unique_ptr< _Tp, _Dp > &  __x,
const unique_ptr< _Up, _Ep > &  __y 
)
inline

Definition at line 671 of file unique_ptr.h.

◆ operator!=() [4/6]

template<typename _Tp , typename _Dp >
bool std::operator!= ( const unique_ptr< _Tp, _Dp > &  __x,
nullptr_t   
)
inlinenoexcept

Definition at line 677 of file unique_ptr.h.

◆ operator!=() [5/6]

template<typename _Tp >
bool std::operator!= ( nullptr_t  ,
const shared_ptr< _Tp > &  __a 
)
inlinenoexcept

Definition at line 363 of file bits/shared_ptr.h.

◆ operator!=() [6/6]

template<typename _Tp , typename _Dp >
bool std::operator!= ( nullptr_t  ,
const unique_ptr< _Tp, _Dp > &  __x 
)
inlinenoexcept

Definition at line 682 of file unique_ptr.h.

◆ operator()() [1/4]

template<typename _Tp >
void std::default_delete< _Tp >::operator() ( _Tp *  __ptr) const
inline

Calls delete __ptr.

Definition at line 70 of file unique_ptr.h.

◆ operator()() [2/4]

template<typename _Tp >
template<typename _Up >
enable_if< is_convertible< _Up(*)[], _Tp(*)[]>::value >::type std::default_delete< _Tp[]>::operator() ( _Up __ptr) const
inline

Calls delete[] __ptr.

Definition at line 106 of file unique_ptr.h.

◆ operator()() [3/4]

template<typename _Tp >
size_t std::hash< shared_ptr< _Tp > >::operator() ( const shared_ptr< _Tp > &  __s) const
inlinenoexcept

Definition at line 645 of file bits/shared_ptr.h.

◆ operator()() [4/4]

template<typename _Tp , typename _Dp >
size_t std::hash< unique_ptr< _Tp, _Dp > >::operator() ( const unique_ptr< _Tp, _Dp > &  __u) const
inlinenoexcept

Definition at line 768 of file unique_ptr.h.

◆ operator*()

template<typename _Tp , typename _Dp = default_delete<_Tp>>
add_lvalue_reference< element_type >::type std::unique_ptr< _Tp, _Dp >::operator* ( ) const
inline

Dereference the stored pointer.

Definition at line 293 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::get().

◆ operator->()

template<typename _Tp , typename _Dp = default_delete<_Tp>>
pointer std::unique_ptr< _Tp, _Dp >::operator-> ( ) const
inlinenoexcept

Return the stored pointer.

Definition at line 301 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::get().

◆ operator<() [1/6]

template<typename _Tp >
bool std::operator< ( const shared_ptr< _Tp > &  __a,
nullptr_t   
)
inlinenoexcept

Definition at line 376 of file bits/shared_ptr.h.

◆ operator<() [2/6]

template<typename _Tp1 , typename _Tp2 >
bool std::operator< ( const shared_ptr< _Tp1 > &  __a,
const shared_ptr< _Tp2 > &  __b 
)
inlinenoexcept

Definition at line 367 of file bits/shared_ptr.h.

◆ operator<() [3/6]

template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
bool std::operator< ( const unique_ptr< _Tp, _Dp > &  __x,
const unique_ptr< _Up, _Ep > &  __y 
)
inline

Definition at line 687 of file unique_ptr.h.

◆ operator<() [4/6]

template<typename _Tp , typename _Dp >
bool std::operator< ( const unique_ptr< _Tp, _Dp > &  __x,
nullptr_t   
)
inline

Definition at line 698 of file unique_ptr.h.

◆ operator<() [5/6]

template<typename _Tp >
bool std::operator< ( nullptr_t  ,
const shared_ptr< _Tp > &  __a 
)
inlinenoexcept

Definition at line 381 of file bits/shared_ptr.h.

◆ operator<() [6/6]

template<typename _Tp , typename _Dp >
bool std::operator< ( nullptr_t  ,
const unique_ptr< _Tp, _Dp > &  __x 
)
inline

Definition at line 704 of file unique_ptr.h.

◆ operator<<()

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 1 of file bits/shared_ptr.h.

◆ operator<=() [1/6]

template<typename _Tp >
bool std::operator<= ( const shared_ptr< _Tp > &  __a,
nullptr_t   
)
inlinenoexcept

Definition at line 392 of file bits/shared_ptr.h.

◆ operator<=() [2/6]

template<typename _Tp1 , typename _Tp2 >
bool std::operator<= ( const shared_ptr< _Tp1 > &  __a,
const shared_ptr< _Tp2 > &  __b 
)
inlinenoexcept

Definition at line 386 of file bits/shared_ptr.h.

◆ operator<=() [3/6]

template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
bool std::operator<= ( const unique_ptr< _Tp, _Dp > &  __x,
const unique_ptr< _Up, _Ep > &  __y 
)
inline

Definition at line 711 of file unique_ptr.h.

◆ operator<=() [4/6]

template<typename _Tp , typename _Dp >
bool std::operator<= ( const unique_ptr< _Tp, _Dp > &  __x,
nullptr_t   
)
inline

Definition at line 717 of file unique_ptr.h.

◆ operator<=() [5/6]

template<typename _Tp >
bool std::operator<= ( nullptr_t  ,
const shared_ptr< _Tp > &  __a 
)
inlinenoexcept

Definition at line 397 of file bits/shared_ptr.h.

◆ operator<=() [6/6]

template<typename _Tp , typename _Dp >
bool std::operator<= ( nullptr_t  ,
const unique_ptr< _Tp, _Dp > &  __x 
)
inline

Definition at line 722 of file unique_ptr.h.

◆ operator=() [1/14]

template<typename _Tp >
enable_shared_from_this & std::enable_shared_from_this< _Tp >::operator= ( const enable_shared_from_this< _Tp > &  )
inlineprotectednoexcept

Definition at line 565 of file bits/shared_ptr.h.

◆ operator=() [2/14]

template<typename _Tp >
template<typename _Tp1 >
shared_ptr & std::shared_ptr< _Tp >::operator= ( const shared_ptr< _Tp1 > &  __r)
inlinenoexcept

Definition at line 275 of file bits/shared_ptr.h.

◆ operator=() [3/14]

template<typename _Tp >
template<typename _Tp1 >
weak_ptr & std::weak_ptr< _Tp >::operator= ( const shared_ptr< _Tp1 > &  __r)
inlinenoexcept

Definition at line 508 of file bits/shared_ptr.h.

◆ operator=() [4/14]

template<typename _Tp >
template<typename _Tp1 >
weak_ptr & std::weak_ptr< _Tp >::operator= ( const weak_ptr< _Tp1 > &  __r)
inlinenoexcept

Definition at line 500 of file bits/shared_ptr.h.

◆ operator=() [5/14]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
unique_ptr & std::unique_ptr< _Tp, _Dp >::operator= ( nullptr_t  )
inlinenoexcept

Reset the unique_ptr to empty, invoking the deleter if necessary.

Definition at line 283 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::reset().

◆ operator=() [6/14]

template<typename _Tp , typename _Dp >
unique_ptr & std::unique_ptr< _Tp[], _Dp >::operator= ( nullptr_t  )
inlinenoexcept

Reset the unique_ptr to empty, invoking the deleter if necessary.

Definition at line 553 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::reset().

◆ operator=() [7/14]

template<typename _Tp >
shared_ptr & std::shared_ptr< _Tp >::operator= ( shared_ptr< _Tp > &&  __r)
inlinenoexcept

Definition at line 292 of file bits/shared_ptr.h.

◆ operator=() [8/14]

template<typename _Tp >
template<class _Tp1 >
shared_ptr & std::shared_ptr< _Tp >::operator= ( shared_ptr< _Tp1 > &&  __r)
inlinenoexcept

Definition at line 300 of file bits/shared_ptr.h.

◆ operator=() [9/14]

template<typename _Tp >
template<typename _Tp1 , typename _Del >
shared_ptr & std::shared_ptr< _Tp >::operator= ( std::unique_ptr< _Tp1, _Del > &&  __r)
inline

Definition at line 308 of file bits/shared_ptr.h.

◆ operator=() [10/14]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
unique_ptr & std::unique_ptr< _Tp, _Dp >::operator= ( unique_ptr< _Tp, _Dp > &&  __u)
inlinenoexcept

Move assignment operator.

Parameters
__uThe object to transfer ownership from.

Invokes the deleter first if this object owns a pointer.

Definition at line 254 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::get_deleter(), and std::unique_ptr< _Tp, _Dp >::reset().

◆ operator=() [11/14]

template<typename _Tp , typename _Dp >
unique_ptr & std::unique_ptr< _Tp[], _Dp >::operator= ( unique_ptr< _Tp[], _Dp > &&  __u)
inlinenoexcept

Move assignment operator.

Parameters
__uThe object to transfer ownership from.

Invokes the deleter first if this object owns a pointer.

Definition at line 524 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::get_deleter(), and std::unique_ptr< _Tp, _Dp >::reset().

◆ operator=() [12/14]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
template<typename _Up , typename _Ep >
enable_if< __and_< __safe_conversion_up< _Up, _Ep >, is_assignable< deleter_type &, _Ep && > >::value, unique_ptr & >::type std::unique_ptr< _Tp, _Dp >::operator= ( unique_ptr< _Up, _Ep > &&  __u)
inlinenoexcept

Assignment from another type.

Parameters
__uThe object to transfer ownership from, which owns a convertible pointer to a non-array object.

Invokes the deleter first if this object owns a pointer.

Definition at line 274 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::get_deleter(), and std::unique_ptr< _Tp, _Dp >::reset().

◆ operator=() [13/14]

template<typename _Tp , typename _Dp >
template<typename _Up , typename _Ep >
enable_if< __and_< __safe_conversion_up< _Up, _Ep >, is_assignable< deleter_type &, _Ep && > >::value, unique_ptr & >::type std::unique_ptr< _Tp[], _Dp >::operator= ( unique_ptr< _Up, _Ep > &&  __u)
inlinenoexcept

Assignment from another type.

Parameters
__uThe object to transfer ownership from, which owns a convertible pointer to an array object.

Invokes the deleter first if this object owns a pointer.

Definition at line 544 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::get_deleter(), and std::unique_ptr< _Tp, _Dp >::reset().

◆ operator=() [14/14]

template<typename _Tp >
template<typename _Tp1 >
weak_ptr & std::weak_ptr< _Tp >::operator= ( weak_ptr< _Tp1 > &&  __r)
inlinenoexcept

Definition at line 519 of file bits/shared_ptr.h.

◆ operator==() [1/6]

template<typename _Tp >
bool std::operator== ( const shared_ptr< _Tp > &  __a,
nullptr_t   
)
inlinenoexcept

Definition at line 342 of file bits/shared_ptr.h.

◆ operator==() [2/6]

template<typename _Tp1 , typename _Tp2 >
bool std::operator== ( const shared_ptr< _Tp1 > &  __a,
const shared_ptr< _Tp2 > &  __b 
)
inlinenoexcept

Definition at line 336 of file bits/shared_ptr.h.

◆ operator==() [3/6]

template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
bool std::operator== ( const unique_ptr< _Tp, _Dp > &  __x,
const unique_ptr< _Up, _Ep > &  __y 
)
inline

Definition at line 654 of file unique_ptr.h.

◆ operator==() [4/6]

template<typename _Tp , typename _Dp >
bool std::operator== ( const unique_ptr< _Tp, _Dp > &  __x,
nullptr_t   
)
inlinenoexcept

Definition at line 660 of file unique_ptr.h.

◆ operator==() [5/6]

template<typename _Tp >
bool std::operator== ( nullptr_t  ,
const shared_ptr< _Tp > &  __a 
)
inlinenoexcept

Definition at line 347 of file bits/shared_ptr.h.

◆ operator==() [6/6]

template<typename _Tp , typename _Dp >
bool std::operator== ( nullptr_t  ,
const unique_ptr< _Tp, _Dp > &  __x 
)
inlinenoexcept

Definition at line 665 of file unique_ptr.h.

◆ operator>() [1/6]

template<typename _Tp >
bool std::operator> ( const shared_ptr< _Tp > &  __a,
nullptr_t   
)
inlinenoexcept

Definition at line 409 of file bits/shared_ptr.h.

◆ operator>() [2/6]

template<typename _Tp1 , typename _Tp2 >
bool std::operator> ( const shared_ptr< _Tp1 > &  __a,
const shared_ptr< _Tp2 > &  __b 
)
inlinenoexcept

Definition at line 403 of file bits/shared_ptr.h.

◆ operator>() [3/6]

template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
bool std::operator> ( const unique_ptr< _Tp, _Dp > &  __x,
const unique_ptr< _Up, _Ep > &  __y 
)
inline

Definition at line 729 of file unique_ptr.h.

◆ operator>() [4/6]

template<typename _Tp , typename _Dp >
bool std::operator> ( const unique_ptr< _Tp, _Dp > &  __x,
nullptr_t   
)
inline

Definition at line 735 of file unique_ptr.h.

◆ operator>() [5/6]

template<typename _Tp >
bool std::operator> ( nullptr_t  ,
const shared_ptr< _Tp > &  __a 
)
inlinenoexcept

Definition at line 414 of file bits/shared_ptr.h.

◆ operator>() [6/6]

template<typename _Tp , typename _Dp >
bool std::operator> ( nullptr_t  ,
const unique_ptr< _Tp, _Dp > &  __x 
)
inline

Definition at line 741 of file unique_ptr.h.

◆ operator>=() [1/6]

template<typename _Tp >
bool std::operator>= ( const shared_ptr< _Tp > &  __a,
nullptr_t   
)
inlinenoexcept

Definition at line 425 of file bits/shared_ptr.h.

◆ operator>=() [2/6]

template<typename _Tp1 , typename _Tp2 >
bool std::operator>= ( const shared_ptr< _Tp1 > &  __a,
const shared_ptr< _Tp2 > &  __b 
)
inlinenoexcept

Definition at line 419 of file bits/shared_ptr.h.

◆ operator>=() [3/6]

template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
bool std::operator>= ( const unique_ptr< _Tp, _Dp > &  __x,
const unique_ptr< _Up, _Ep > &  __y 
)
inline

Definition at line 748 of file unique_ptr.h.

◆ operator>=() [4/6]

template<typename _Tp , typename _Dp >
bool std::operator>= ( const unique_ptr< _Tp, _Dp > &  __x,
nullptr_t   
)
inline

Definition at line 754 of file unique_ptr.h.

◆ operator>=() [5/6]

template<typename _Tp >
bool std::operator>= ( nullptr_t  ,
const shared_ptr< _Tp > &  __a 
)
inlinenoexcept

Definition at line 430 of file bits/shared_ptr.h.

◆ operator>=() [6/6]

template<typename _Tp , typename _Dp >
bool std::operator>= ( nullptr_t  ,
const unique_ptr< _Tp, _Dp > &  __x 
)
inline

Definition at line 759 of file unique_ptr.h.

◆ operator[]()

template<typename _Tp , typename _Dp >
std::add_lvalue_reference< element_type >::type std::unique_ptr< _Tp[], _Dp >::operator[] ( size_t  __i) const
inline

Access an element of owned array.

Definition at line 563 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::get().

◆ release() [1/2]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
pointer std::unique_ptr< _Tp, _Dp >::release ( )
inlinenoexcept

Release ownership of any stored pointer.

Definition at line 330 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::get().

◆ release() [2/2]

template<typename _Tp , typename _Dp >
pointer std::unique_ptr< _Tp[], _Dp >::release ( )
inlinenoexcept

Release ownership of any stored pointer.

Definition at line 592 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::get().

◆ reset() [1/3]

template<typename _Tp , typename _Dp >
template<typename _Up , typename = _Require< __or_<is_same<_Up, pointer>, __and_<is_same<pointer, element_type*>, is_pointer<_Up>, is_convertible< typename remove_pointer<_Up>::type(*)[], element_type(*)[] > > > >>
void std::unique_ptr< _Tp[], _Dp >::reset ( _Up  __p)
inlinenoexcept

Replace the stored pointer.

Parameters
__pThe new pointer to store.

The deleter will be invoked if a pointer is already owned.

Definition at line 618 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::get_deleter(), and std::unique_ptr< _Tp, _Dp >::swap().

◆ reset() [2/3]

template<typename _Tp , typename _Dp >
void std::unique_ptr< _Tp[], _Dp >::reset ( nullptr_t  = nullptr)
inlinenoexcept

Definition at line 627 of file unique_ptr.h.

◆ reset() [3/3]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
void std::unique_ptr< _Tp, _Dp >::reset ( pointer  __p = pointer())
inlinenoexcept

◆ shared_from_this() [1/2]

template<typename _Tp >
shared_ptr< _Tp > std::enable_shared_from_this< _Tp >::shared_from_this ( )
inline

Definition at line 572 of file bits/shared_ptr.h.

◆ shared_from_this() [2/2]

template<typename _Tp >
shared_ptr< const _Tp > std::enable_shared_from_this< _Tp >::shared_from_this ( ) const
inline

Definition at line 576 of file bits/shared_ptr.h.

◆ static_pointer_cast()

template<typename _Tp , typename _Tp1 >
shared_ptr< _Tp > std::static_pointer_cast ( const shared_ptr< _Tp1 > &  __r)
inlinenoexcept

Definition at line 446 of file bits/shared_ptr.h.

◆ swap() [1/5]

template<typename _Tp >
void std::swap ( shared_ptr< _Tp > &  __a,
shared_ptr< _Tp > &  __b 
)
inlinenoexcept

Definition at line 440 of file bits/shared_ptr.h.

◆ swap() [2/5]

template<typename _Tp , typename _Dp = default_delete<_Tp>>
void std::unique_ptr< _Tp, _Dp >::swap ( unique_ptr< _Tp, _Dp > &  __u)
inlinenoexcept

◆ swap() [3/5]

template<typename _Tp , typename _Dp >
void std::unique_ptr< _Tp[], _Dp >::swap ( unique_ptr< _Tp[], _Dp > &  __u)
inlinenoexcept

Exchange the pointer and deleter with another object.

Definition at line 634 of file unique_ptr.h.

References std::unique_ptr< _Tp, _Dp >::swap().

◆ swap() [4/5]

template<typename _Tp , typename _Dp >
void std::swap ( unique_ptr< _Tp, _Dp > &  __x,
unique_ptr< _Tp, _Dp > &  __y 
)
inlinenoexcept

Definition at line 647 of file unique_ptr.h.

◆ swap() [5/5]

template<typename _Tp >
void std::swap ( weak_ptr< _Tp > &  __a,
weak_ptr< _Tp > &  __b 
)
inlinenoexcept

Definition at line 533 of file bits/shared_ptr.h.

Friends

◆ __enable_shared_from_this_helper

template<typename _Tp >
template<typename _Tp1 , typename _Tp2 >
void __enable_shared_from_this_helper ( const __shared_count<> &  ,
const enable_shared_from_this< _Tp1 > *  ,
const _Tp2 *   
)
friend

Definition at line 596 of file bits/shared_ptr.h.

◆ allocate_shared

template<typename _Tp >
template<typename _Tp1 , typename _Alloc , typename... _Args>
shared_ptr< _Tp1 > allocate_shared ( const _Alloc &  __a,
_Args &&...  __args 
)
friend

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 617 of file bits/shared_ptr.h.

◆ weak_ptr< _Tp >

template<typename _Tp >
friend class weak_ptr< _Tp >
friend

Definition at line 327 of file bits/shared_ptr.h.