libstdc++: Pointer Abstractions (original) (raw)

Classes
class std::auto_ptr< _Tp >
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< void >
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 _Del , typename _Tp , _Lock_policy _Lp>
_Del * std::get_deleter (const __shared_ptr< _Tp, _Lp > &__p) noexcept
template<typename _Del , typename _Tp >
_Del * get_deleter (const shared_ptr< _Tp > &__p) noexcept
template<typename _Tp , typename... _Args>
constexpr __detail::__unique_ptr_t< _Tp > make_unique (_Args &&... __args)
template<typename _Tp , typename... _Args>
__detail::__invalid_make_unique_t< _Tp > make_unique (_Args &&...)=delete
template<typename _Tp >
constexpr __detail::__unique_ptr_array_t< _Tp > make_unique (size_t __num)
template<typename _Tp >
constexpr __detail::__unique_ptr_t< _Tp > make_unique_for_overwrite ()
template<typename _Tp , typename... _Args>
__detail::__invalid_make_unique_t< _Tp > make_unique_for_overwrite (_Args &&...)=delete
template<typename _Tp >
constexpr __detail::__unique_ptr_array_t< _Tp > make_unique_for_overwrite (size_t __num)
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
constexpr bool std::operator< (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
template<typename _Tp , typename _Dp >
constexpr bool std::operator< (const unique_ptr< _Tp, _Dp > &__x, nullptr_t)
template<typename _Tp , typename _Dp >
constexpr bool std::operator< (nullptr_t, const unique_ptr< _Tp, _Dp > &__x)
template<typename _CharT , typename _Traits , typename _Tp , typename _Dp >
basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, const unique_ptr< _Tp, _Dp > &__p)
template<typename _Ch , typename _Tr , typename _Tp , _Lock_policy _Lp>
std::basic_ostream< _Ch, _Tr > & operator<< (std::basic_ostream< _Ch, _Tr > &__os, const __shared_ptr< _Tp, _Lp > &__p)
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
constexpr bool std::operator<= (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
template<typename _Tp , typename _Dp >
constexpr bool std::operator<= (const unique_ptr< _Tp, _Dp > &__x, nullptr_t)
template<typename _Tp , typename _Dp >
constexpr bool std::operator<= (nullptr_t, const unique_ptr< _Tp, _Dp > &__x)
template<typename _Tp , typename _Dp , typename _Up , typename _Ep > requires three_way_comparable_with<typename unique_ptr<_Tp, _Dp>::pointer, typename unique_ptr<_Up, _Ep>::pointer>
constexpr compare_three_way_result_t< typename unique_ptr< _Tp, _Dp >::pointer, typename unique_ptr< _Up, _Ep >::pointer > std::operator<=> (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
template<typename _Tp , typename _Dp > requires three_way_comparable<typename unique_ptr<_Tp, _Dp>::pointer>
constexpr compare_three_way_result_t< typename unique_ptr< _Tp, _Dp >::pointer > std::operator<=> (const unique_ptr< _Tp, _Dp > &__x, nullptr_t)
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
constexpr bool std::operator== (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
template<typename _Tp , typename _Dp >
constexpr bool std::operator== (const unique_ptr< _Tp, _Dp > &__x, nullptr_t) noexcept
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
constexpr bool std::operator> (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
template<typename _Tp , typename _Dp >
constexpr bool std::operator> (const unique_ptr< _Tp, _Dp > &__x, nullptr_t)
template<typename _Tp , typename _Dp >
constexpr bool std::operator> (nullptr_t, const unique_ptr< _Tp, _Dp > &__x)
template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
constexpr bool std::operator>= (const unique_ptr< _Tp, _Dp > &__x, const unique_ptr< _Up, _Ep > &__y)
template<typename _Tp , typename _Dp >
constexpr 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 _Del >
std::shared_ptr (unique_ptr< _Tp, _Del >) -> shared_ptr< _Tp >
template<typename _Tp >
std::shared_ptr (weak_ptr< _Tp >) -> shared_ptr< _Tp >
template<typename _Tp , typename _Dp >
enable_if<!__is_swappable< _Dp >::value >::type std::swap (unique_ptr< _Tp, _Dp > &, unique_ptr< _Tp, _Dp > &)=delete
template<typename _Tp , typename _Dp >
constexpr enable_if< __is_swappable< _Dp >::value >::type swap (unique_ptr< _Tp, _Dp > &__x, unique_ptr< _Tp, _Dp > &__y) noexcept
template<typename _Tp >
void swap (weak_ptr< _Tp > &__a, weak_ptr< _Tp > &__b) noexcept
template<typename _Tp >
constexpr _Tp * std::to_address (_Tp *__ptr) noexcept
template<typename _Ptr >
constexpr auto std::to_address (const _Ptr &__ptr) noexcept
template<typename _Tp >
std::weak_ptr (shared_ptr< _Tp >) -> weak_ptr< _Tp >
template<typename _Tp , _Lock_policy _Lp>
bool std::atomic_is_lock_free (const __shared_ptr< _Tp, _Lp > *)
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, _Lp > std::atomic_load_explicit (const __shared_ptr< _Tp, _Lp > *__p, memory_order)
template<typename _Tp , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lp > std::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, _Lp > std::atomic_exchange_explicit (__shared_ptr< _Tp, _Lp > *__p, __shared_ptr< _Tp, _Lp > __r, memory_order)
template<typename _Tp , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lp > std::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)
template<typename _Tp , typename _Up >
bool operator== (const shared_ptr< _Tp > &__a, const shared_ptr< _Up > &__b) noexcept
template<typename _Tp >
bool operator== (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
template<typename _Tp >
void swap (shared_ptr< _Tp > &__a, shared_ptr< _Tp > &__b) noexcept
template<typename _Tp , typename _Up >
shared_ptr< _Tp > static_pointer_cast (const shared_ptr< _Up > &__r) noexcept
template<typename _Tp , typename _Up >
shared_ptr< _Tp > const_pointer_cast (const shared_ptr< _Up > &__r) noexcept
template<typename _Tp , typename _Up >
shared_ptr< _Tp > dynamic_pointer_cast (const shared_ptr< _Up > &__r) noexcept
template<typename _Tp , typename _Up >
shared_ptr< _Tp > reinterpret_pointer_cast (const shared_ptr< _Up > &__r) noexcept
template<typename _Tp , typename _Up >
shared_ptr< _Tp > static_pointer_cast (shared_ptr< _Up > &&__r) noexcept
template<typename _Tp , typename _Up >
shared_ptr< _Tp > const_pointer_cast (shared_ptr< _Up > &&__r) noexcept
template<typename _Tp , typename _Up >
shared_ptr< _Tp > dynamic_pointer_cast (shared_ptr< _Up > &&__r) noexcept
template<typename _Tp , typename _Up >
shared_ptr< _Tp > reinterpret_pointer_cast (shared_ptr< _Up > &&__r) noexcept
template<typename _Tp , typename _Alloc , typename... _Args>
shared_ptr< _NonArray< _Tp > > allocate_shared (const _Alloc &__a, _Args &&... __args)
template<typename _Tp , typename... _Args>
shared_ptr< _NonArray< _Tp > > make_shared (_Args &&... __args)
template<typename _Tp , typename _Alloc >
shared_ptr< _UnboundedArray< _Tp > > allocate_shared (const _Alloc &__a, size_t __n)
template<typename _Tp , typename _Alloc >
shared_ptr< _BoundedArray< _Tp > > allocate_shared (const _Alloc &__a)

Smart pointers, etc.

allocate_shared() [1/3]

template<typename _Tp , typename _Alloc >

shared_ptr< _BoundedArray< _Tp > > allocate_shared ( const _Alloc & __a) related

Create an object that is owned by a shared_ptr.

Parameters

__a An allocator.
__args Arguments for the _Tp object's constructor.

Returns

A shared_ptr that owns the newly created object.

Exceptions

An exception 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 1071 of file bits/shared_ptr.h.

allocate_shared() [2/3]

template<typename _Tp , typename _Alloc , typename... _Args>

shared_ptr< _NonArray< _Tp > > allocate_shared ( const _Alloc & __a, _Args &&... __args ) related

Create an object that is owned by a shared_ptr.

Parameters

__a An allocator.
__args Arguments for the _Tp object's constructor.

Returns

A shared_ptr that owns the newly created object.

Exceptions

An exception 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 988 of file bits/shared_ptr.h.

allocate_shared() [3/3]

template<typename _Tp , typename _Alloc >

shared_ptr< _UnboundedArray< _Tp > > allocate_shared ( const _Alloc & __a, size_t __n ) related

Create an object that is owned by a shared_ptr.

Parameters

__a An allocator.
__args Arguments for the _Tp object's constructor.

Returns

A shared_ptr that owns the newly created object.

Exceptions

An exception 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 1028 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

Atomic compare-and-swap for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__v A non-null pointer to a shared_ptr object.
__w A 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.

Definition at line 346 of file shared_ptr_atomic.h.

References std::move().

atomic_compare_exchange_strong() [2/2]

Atomic compare-and-swap for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__v A non-null pointer to a shared_ptr object.
__w A 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.

Definition at line 290 of file shared_ptr_atomic.h.

References std::move().

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
)

Atomic compare-and-swap for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__v A non-null pointer to a shared_ptr object.
__w A 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.

Definition at line 323 of file shared_ptr_atomic.h.

References std::move().

atomic_compare_exchange_strong_explicit() [2/2]

Atomic compare-and-swap for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__v A non-null pointer to a shared_ptr object.
__w A 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.

Definition at line 267 of file shared_ptr_atomic.h.

References std::move().

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

Atomic compare-and-swap for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__v A non-null pointer to a shared_ptr object.
__w A 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.

Definition at line 370 of file shared_ptr_atomic.h.

References std::move().

atomic_compare_exchange_weak() [2/2]

Atomic compare-and-swap for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__v A non-null pointer to a shared_ptr object.
__w A 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.

Definition at line 313 of file shared_ptr_atomic.h.

References std::move().

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

Atomic compare-and-swap for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__v A non-null pointer to a shared_ptr object.
__w A 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.

Definition at line 357 of file shared_ptr_atomic.h.

References std::move().

atomic_compare_exchange_weak_explicit() [2/2]

Atomic compare-and-swap for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__v A non-null pointer to a shared_ptr object.
__w A 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.

Definition at line 300 of file shared_ptr_atomic.h.

References std::move().

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

Atomic exchange for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__r New value to store in *__p.

Returns

The original value of *__p

Definition at line 246 of file shared_ptr_atomic.h.

References std::move().

atomic_exchange() [2/2]

Atomic exchange for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__r New value to store in *__p.

Returns

The original value of *__p

Definition at line 225 of file shared_ptr_atomic.h.

References std::move().

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

Atomic exchange for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__r New value to store in *__p.

Returns

The original value of *__p

Definition at line 234 of file shared_ptr_atomic.h.

atomic_exchange_explicit() [2/2]

Atomic exchange for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__r New value to store in *__p.

Returns

The original value of *__p

Definition at line 214 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 > * ) inline

Report whether shared_ptr atomic operations are lock-free.

Parameters

__p A non-null pointer to a shared_ptr object.

Returns

True if atomic access to *__p is lock-free, false otherwise.

Definition at line 104 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

__p A non-null pointer to a shared_ptr object.

Returns

True if atomic access to *__p is lock-free, false otherwise.

Definition at line 116 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

Atomic load for shared_ptr objects.

Parameters

__p A 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 157 of file shared_ptr_atomic.h.

atomic_load() [2/2]

Atomic load for shared_ptr objects.

Parameters

__p A 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 142 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

Atomic load for shared_ptr objects.

Parameters

__p A 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 148 of file shared_ptr_atomic.h.

atomic_load_explicit() [2/2]

Atomic load for shared_ptr objects.

Parameters

__p A 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 133 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

Atomic store for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__r The value to store.

The memory order shall not be memory_order_acquire or memory_order_acq_rel.

Definition at line 200 of file shared_ptr_atomic.h.

References std::move().

atomic_store() [2/2]

Atomic store for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__r The value to store.

The memory order shall not be memory_order_acquire or memory_order_acq_rel.

Definition at line 183 of file shared_ptr_atomic.h.

References std::move().

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

Atomic store for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__r The value to store.

The memory order shall not be memory_order_acquire or memory_order_acq_rel.

Definition at line 189 of file shared_ptr_atomic.h.

atomic_store_explicit() [2/2]

Atomic store for shared_ptr objects.

Parameters

__p A non-null pointer to a shared_ptr object.
__r The value to store.

The memory order shall not be memory_order_acquire or memory_order_acq_rel.

Definition at line 173 of file shared_ptr_atomic.h.

const_pointer_cast() [1/2]

template<typename _Tp , typename _Up >

const_pointer_cast() [2/2]

template<typename _Tp , typename _Up >

dynamic_pointer_cast() [1/2]

template<typename _Tp , typename _Up >

dynamic_pointer_cast() [2/2]

template<typename _Tp , typename _Up >

get_deleter() [1/2]

template<typename _Del , typename _Tp , _Lock_policy _Lp>

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

get_deleter() [2/2]

template<typename _Del , typename _Tp >

_Del * get_deleter ( const shared_ptr< _Tp > & __p) related

20.7.2.2.10 shared_ptr get_deleter

If __p has a deleter of type _Del, return a pointer to it.

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

make_shared()

template<typename _Tp , typename... _Args>

shared_ptr< _NonArray< _Tp > > make_shared ( _Args &&... __args) related

Create an object that is owned by a shared_ptr.

Parameters

__args Arguments for the _Tp object's constructor.

Returns

A shared_ptr that owns the newly created object.

Exceptions

std::bad_alloc,or an exception thrown from the constructor of _Tp.

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

make_unique() [1/3]

template<typename _Tp , typename... _Args>

constexpr __detail::__unique_ptr_t< _Tp > make_unique ( _Args &&... __args) related

Create an object owned by a unique_ptr.

Template Parameters

_Tp A non-array object type.

Parameters

__args Constructor arguments for the new object.

Returns

A unique_ptr<_Tp> that owns the new object.

Since

C++14

Definition at line 1075 of file unique_ptr.h.

make_unique() [2/3]

template<typename _Tp , typename... _Args>

__detail::__invalid_make_unique_t< _Tp > make_unique ( _Args && ...) related

Disable std::make_unique for arrays of known bound.

Template Parameters

_Tp An array type of known bound, such as U[N].

Since

C++14

make_unique() [3/3]

template<typename _Tp >

constexpr __detail::__unique_ptr_array_t< _Tp > make_unique ( size_t __num) related

Create an array owned by a unique_ptr.

Template Parameters

_Tp An array type of unknown bound, such as U[].

Parameters

__num The number of elements of type U in the new array.

Returns

A unique_ptr<U[]> that owns the new array.

Since

C++14

The array elements are value-initialized.

Definition at line 1090 of file unique_ptr.h.

make_unique_for_overwrite() [1/3]

template<typename _Tp >

constexpr __detail::__unique_ptr_t< _Tp > make_unique_for_overwrite ( ) related

Create a default-initialied object owned by a unique_ptr.

Template Parameters

_Tp A non-array object type.

Returns

A unique_ptr<_Tp> that owns the new object.

Since

C++20

Definition at line 1112 of file unique_ptr.h.

make_unique_for_overwrite() [2/3]

template<typename _Tp , typename... _Args>

__detail::__invalid_make_unique_t< _Tp > make_unique_for_overwrite ( _Args && ...) related

Disable std::make_unique_for_overwrite for arrays of known bound.

Template Parameters

_Tp An array type of known bound, such as U[N].

Since

C++20

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

make_unique_for_overwrite() [3/3]

template<typename _Tp >

constexpr __detail::__unique_ptr_array_t< _Tp > make_unique_for_overwrite ( size_t __num) related

Create a default-initialized array owned by a unique_ptr.

Template Parameters

_Tp An array type of unknown bound, such as U[].

Parameters

__num The number of elements of type U in the new array.

Returns

A unique_ptr<U[]> that owns the new array.

Since

C++20

Definition at line 1125 of file unique_ptr.h.

operator<() [1/3]

template<typename _Tp , typename _Dp , typename _Up , typename _Ep >

constexpr bool std::operator< ( const unique_ptr< _Tp, _Dp > & __x, const unique_ptr< _Up, _Ep > & __y ) inlineconstexpr

operator<() [2/3]

template<typename _Tp , typename _Dp >

constexpr bool std::operator< ( const unique_ptr< _Tp, _Dp > & __x, nullptr_t ) inlineconstexpr

operator<() [3/3]

template<typename _Tp , typename _Dp >

constexpr bool std::operator< ( nullptr_t , const unique_ptr< _Tp, _Dp > & __x ) inlineconstexpr

operator<<() [1/2]

template<typename _CharT , typename _Traits , typename _Tp , typename _Dp >

Stream output operator for unique_ptr.

Since

C++20

Definition at line 1135 of file unique_ptr.h.

operator<<() [2/2]

template<typename _Ch , typename _Tr , typename _Tp , _Lock_policy _Lp>

operator<=() [1/3]

template<typename _Tp , typename _Dp , typename _Up , typename _Ep >

constexpr bool std::operator<= ( const unique_ptr< _Tp, _Dp > & __x, const unique_ptr< _Up, _Ep > & __y ) inlineconstexpr

Relational operator for unique_ptr objects, compares the owned pointers.

Definition at line 918 of file unique_ptr.h.

operator<=() [2/3]

template<typename _Tp , typename _Dp >

constexpr bool std::operator<= ( const unique_ptr< _Tp, _Dp > & __x, nullptr_t ) inlineconstexpr

unique_ptr comparison with nullptr

Definition at line 926 of file unique_ptr.h.

operator<=() [3/3]

template<typename _Tp , typename _Dp >

constexpr bool std::operator<= ( nullptr_t , const unique_ptr< _Tp, _Dp > & __x ) inlineconstexpr

unique_ptr comparison with nullptr

Definition at line 933 of file unique_ptr.h.

operator<=>() [1/2]

template<typename _Tp , typename _Dp , typename _Up , typename _Ep >
requires three_way_comparable_with<typename unique_ptr<_Tp, _Dp>::pointer, typename unique_ptr<_Up, _Ep>::pointer>

operator<=>() [2/2]

template<typename _Tp , typename _Dp >
requires three_way_comparable<typename unique_ptr<_Tp, _Dp>::pointer>

operator==() [1/4]

template<typename _Tp , typename _Up >

Equality operator for shared_ptr objects, compares the stored pointers

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

operator==() [2/4]

template<typename _Tp >

bool operator== ( const shared_ptr< _Tp > & __a, nullptr_t ) related

operator==() [3/4]

template<typename _Tp , typename _Dp , typename _Up , typename _Ep >

constexpr bool std::operator== ( const unique_ptr< _Tp, _Dp > & __x, const unique_ptr< _Up, _Ep > & __y ) inlineconstexpr

operator==() [4/4]

template<typename _Tp , typename _Dp >

constexpr bool std::operator== ( const unique_ptr< _Tp, _Dp > & __x, nullptr_t ) inlineconstexprnoexcept

unique_ptr comparison with nullptr

Definition at line 845 of file unique_ptr.h.

operator>() [1/3]

template<typename _Tp , typename _Dp , typename _Up , typename _Ep >

constexpr bool std::operator> ( const unique_ptr< _Tp, _Dp > & __x, const unique_ptr< _Up, _Ep > & __y ) inlineconstexpr

Relational operator for unique_ptr objects, compares the owned pointers.

Definition at line 942 of file unique_ptr.h.

operator>() [2/3]

template<typename _Tp , typename _Dp >

constexpr bool std::operator> ( const unique_ptr< _Tp, _Dp > & __x, nullptr_t ) inlineconstexpr

operator>() [3/3]

template<typename _Tp , typename _Dp >

constexpr bool std::operator> ( nullptr_t , const unique_ptr< _Tp, _Dp > & __x ) inlineconstexpr

operator>=() [1/3]

template<typename _Tp , typename _Dp , typename _Up , typename _Ep >

constexpr bool std::operator>= ( const unique_ptr< _Tp, _Dp > & __x, const unique_ptr< _Up, _Ep > & __y ) inlineconstexpr

Relational operator for unique_ptr objects, compares the owned pointers.

Definition at line 971 of file unique_ptr.h.

operator>=() [2/3]

template<typename _Tp , typename _Dp >

constexpr bool std::operator>= ( const unique_ptr< _Tp, _Dp > & __x, nullptr_t ) inlineconstexpr

unique_ptr comparison with nullptr

Definition at line 979 of file unique_ptr.h.

operator>=() [3/3]

template<typename _Tp , typename _Dp >

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

unique_ptr comparison with nullptr

Definition at line 985 of file unique_ptr.h.

reinterpret_pointer_cast() [1/2]

template<typename _Tp , typename _Up >

Convert type of shared_ptr, via reinterpret_cast

Since

C++17

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

reinterpret_pointer_cast() [2/2]

template<typename _Tp , typename _Up >

static_pointer_cast() [1/2]

template<typename _Tp , typename _Up >

static_pointer_cast() [2/2]

template<typename _Tp , typename _Up >

swap() [1/3]

swap() [2/3]

template<typename _Tp , typename _Dp >

swap() [3/3]

to_address() [1/2]

template<typename _Tp >

constexpr _Tp * std::to_address ( _Tp * __ptr) constexprnoexcept

Obtain address referenced by a pointer to an object.

Parameters

__ptr A pointer to an object

Returns

__ptr

Definition at line 228 of file ptr_traits.h.

Referenced by std::to_address().

to_address() [2/2]

template<typename _Ptr >

constexpr auto std::to_address ( const _Ptr & __ptr) constexprnoexcept

Obtain address referenced by a pointer to an object.

Parameters

__ptr A pointer to an object

Returns

pointer_traits<_Ptr>::to_address(__ptr) if that expression is well-formed, otherwise to_address(__ptr.operator->())

Definition at line 244 of file ptr_traits.h.

References std::to_address().