shared_ptr.h File Reference

Go to the source code of this file.

## Classes

struct | std::experimental::fundamentals_v2::owner_less< shared_ptr< _Tp > >
struct | std::experimental::fundamentals_v2::owner_less< weak_ptr< _Tp > >
struct | std::hash< experimental::shared_ptr< _Tp > >

## Namespaces

namespace | std

## Functions

template<typename _Tp >
bool | std::experimental::atomic_compare_exchange_strong (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w)
template<typename _Tp >
bool | std::experimental::atomic_compare_exchange_strong_explicit (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w, memory_order __success, memory_order __failure)
template<typename _Tp >
bool | std::experimental::atomic_compare_exchange_weak (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w)
template<typename _Tp >
bool | std::experimental::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 >
void | std::experimental::atomic_exchange (shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r)
template<typename _Tp >
shared_ptr< _Tp > | std::experimental::atomic_exchange_explicit (const shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r, memory_order __mo)
template<typename _Tp >
bool | std::experimental::atomic_is_lock_free (const shared_ptr< _Tp > *__p)
template<typename _Tp >
shared_ptr< _Tp > | std::experimental::atomic_load (const shared_ptr< _Tp > *__p)
template<typename _Tp >
shared_ptr< _Tp > | std::experimental::atomic_load_explicit (const shared_ptr< _Tp > *__p, memory_order __mo)
template<typename _Tp >
void | std::experimental::atomic_store (shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r)
template<typename _Tp >
shared_ptr< _Tp > | std::experimental::atomic_store_explicit (const shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r, memory_order __mo)
template<typename _Tp , typename _Tp1 >
shared_ptr< _Tp > | std::experimental::const_pointer_cast (const shared_ptr< _Tp1 > &__r) noexcept
template<typename _Tp , typename _Tp1 >
shared_ptr< _Tp > | std::experimental::dynamic_pointer_cast (const shared_ptr< _Tp1 > &__r) noexcept
template<typename _Del , typename _Tp >
_Del * | std::experimental::get_deleter (const shared_ptr< _Tp > &__p) noexcept
template<typename _Tp >
bool | std::experimental::operator!= (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
template<typename _Tp1 , typename _Tp2 >
bool | std::experimental::operator!= (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
template<typename _Tp >
bool | std::experimental::operator!= (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
template<typename _Tp >
bool | std::experimental::operator< (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
template<typename _Tp1 , typename _Tp2 >
bool | std::experimental::operator< (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
template<typename _Tp >
bool | std::experimental::operator< (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
template<typename _Ch , typename _Tr , typename _Tp >
std::basic_ostream< _Ch, _Tr > & | std::experimental::operator<< (std::basic_ostream< _Ch, _Tr > &__os, const shared_ptr< _Tp > &__p)
template<typename _Tp >
bool | std::experimental::operator<= (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
template<typename _Tp1 , typename _Tp2 >
bool | std::experimental::operator<= (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
template<typename _Tp >
bool | std::experimental::operator<= (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
template<typename _Tp >
bool | std::experimental::operator== (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
template<typename _Tp1 , typename _Tp2 >
bool | std::experimental::operator== (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
template<typename _Tp >
bool | std::experimental::operator== (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
template<typename _Tp >
bool | std::experimental::operator> (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
template<typename _Tp1 , typename _Tp2 >
bool | std::experimental::operator> (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
template<typename _Tp >
bool | std::experimental::operator> (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
template<typename _Tp >
bool | std::experimental::operator>= (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
template<typename _Tp1 , typename _Tp2 >
bool | std::experimental::operator>= (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
template<typename _Tp >
bool | std::experimental::operator>= (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
template<typename _Tp , typename _Tp1 >
shared_ptr< _Tp > | std::experimental::reinterpret_pointer_cast (const shared_ptr< _Tp1 > &__r) noexcept
template<typename _Tp , typename _Tp1 >
shared_ptr< _Tp > | std::experimental::static_pointer_cast (const shared_ptr< _Tp1 > &__r) noexcept
template<typename _Tp >
void | std::experimental::swap (shared_ptr< _Tp > &__a, shared_ptr< _Tp > &__b) noexcept
template<typename _Tp >
void | std::experimental::swap (weak_ptr< _Tp > &__a, weak_ptr< _Tp > &__b) noexcept

## Variables

template<typename _Yp , typename _Tp >
constexpr bool | std::experimental::__sp_compatible_v
template<typename _Tp , typename _Yp >
constexpr bool | std::experimental::__sp_is_constructible_v

## Detailed Description

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <experimental/memory>.

Definition in file experimental/bits/shared_ptr.h.

## Function Documentation

## atomic_compare_exchange_strong()

template<typename _Tp >

bool std::experimental::fundamentals_v2::atomic_compare_exchange_strong | ( | shared_ptr< _Tp > * | __p,
|  | shared_ptr< _Tp > * | __v,
|  | shared_ptr< _Tp > | __w
| ) |  |

Definition at line 587 of file experimental/bits/shared_ptr.h.

## atomic_compare_exchange_strong_explicit()

template<typename _Tp >

bool std::experimental::fundamentals_v2::atomic_compare_exchange_strong_explicit | ( | shared_ptr< _Tp > * | __p,
|  | shared_ptr< _Tp > * | __v,
|  | shared_ptr< _Tp > | __w,
|  | memory_order | __success,
|  | memory_order | __failure
| ) |  |

Definition at line 603 of file experimental/bits/shared_ptr.h.

## atomic_compare_exchange_weak()

template<typename _Tp >

bool std::experimental::fundamentals_v2::atomic_compare_exchange_weak | ( | shared_ptr< _Tp > * | __p,
|  | shared_ptr< _Tp > * | __v,
|  | shared_ptr< _Tp > | __w
| ) |  |

Definition at line 581 of file experimental/bits/shared_ptr.h.

## atomic_compare_exchange_weak_explicit()

template<typename _Tp >

bool std::experimental::fundamentals_v2::atomic_compare_exchange_weak_explicit | ( | shared_ptr< _Tp > * | __p,
|  | shared_ptr< _Tp > * | __v,
|  | shared_ptr< _Tp > | __w,
|  | memory_order | __success,
|  | memory_order | __failure
| ) |  |

Definition at line 593 of file experimental/bits/shared_ptr.h.

## atomic_exchange()

template<typename _Tp >

void std::experimental::fundamentals_v2::atomic_exchange | ( | shared_ptr< _Tp > * | __p,
|  | shared_ptr< _Tp > | __r
| ) |  |

Definition at line 570 of file experimental/bits/shared_ptr.h.

## atomic_exchange_explicit()

template<typename _Tp >

shared_ptr< _Tp > std::experimental::fundamentals_v2::atomic_exchange_explicit | ( | const shared_ptr< _Tp > * | __p,
|  | shared_ptr< _Tp > | __r,
|  | memory_order | __mo
| ) |  |

Definition at line 575 of file experimental/bits/shared_ptr.h.

## atomic_is_lock_free()

template<typename _Tp >

bool std::experimental::fundamentals_v2::atomic_is_lock_free | ( | const shared_ptr< _Tp > * | __p | ) |

inline

Definition at line 546 of file experimental/bits/shared_ptr.h.

## atomic_load()

template<typename _Tp >

shared_ptr< _Tp > std::experimental::fundamentals_v2::atomic_load | ( | const shared_ptr< _Tp > * | __p | ) |

Definition at line 550 of file experimental/bits/shared_ptr.h.

## atomic_load_explicit()

template<typename _Tp >

shared_ptr< _Tp > std::experimental::fundamentals_v2::atomic_load_explicit | ( | const shared_ptr< _Tp > * | __p,
|  | memory_order | __mo
| ) |  |

Definition at line 555 of file experimental/bits/shared_ptr.h.

## atomic_store()

template<typename _Tp >

void std::experimental::fundamentals_v2::atomic_store | ( | shared_ptr< _Tp > * | __p,
|  | shared_ptr< _Tp > | __r
| ) |  |

Definition at line 559 of file experimental/bits/shared_ptr.h.

## atomic_store_explicit()

template<typename _Tp >

shared_ptr< _Tp > std::experimental::fundamentals_v2::atomic_store_explicit | ( | const shared_ptr< _Tp > * | __p,
|  | shared_ptr< _Tp > | __r,
|  | memory_order | __mo
| ) |  |

Definition at line 564 of file experimental/bits/shared_ptr.h.

## const_pointer_cast()

template<typename _Tp , typename _Tp1 >

shared_ptr< _Tp > std::experimental::fundamentals_v2::const_pointer_cast | ( | const shared_ptr< _Tp1 > & | __r | ) |

inline noexcept

Definition at line 398 of file experimental/bits/shared_ptr.h.

## dynamic_pointer_cast()

template<typename _Tp , typename _Tp1 >

shared_ptr< _Tp > std::experimental::fundamentals_v2::dynamic_pointer_cast | ( | const shared_ptr< _Tp1 > & | __r | ) |

inline noexcept

Definition at line 388 of file experimental/bits/shared_ptr.h.

## get_deleter()

template<typename _Del , typename _Tp >

_Del * std::experimental::fundamentals_v2::get_deleter | ( | const shared_ptr< _Tp > & | __p | ) |

inline noexcept

C++14 20.8.2.2.10.

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

## operator!=() [1/3]

template<typename _Tp >

bool std::experimental::fundamentals_v2::operator!= | ( | const shared_ptr< _Tp > & | __a,
|  | nullptr_t |
| ) |  |

inline noexcept

Definition at line 282 of file experimental/bits/shared_ptr.h.

## operator!=() [2/3]

template<typename _Tp1 , typename _Tp2 >

bool std::experimental::fundamentals_v2::operator!= | ( | const shared_ptr< _Tp1 > & | __a,
|  | const shared_ptr< _Tp2 > & | __b
| ) |  |

inline noexcept

Definition at line 276 of file experimental/bits/shared_ptr.h.

## operator!=() [3/3]

template<typename _Tp >

bool std::experimental::fundamentals_v2::operator!= | ( | nullptr_t | ,
|  | const shared_ptr< _Tp > & | __a
| ) |  |

inline noexcept

Definition at line 287 of file experimental/bits/shared_ptr.h.

## operator<() [1/3]

template<typename _Tp >

bool std::experimental::fundamentals_v2::operator< | ( | const shared_ptr< _Tp > & | __a,
|  | nullptr_t |
| ) |  |

inline noexcept

Definition at line 302 of file experimental/bits/shared_ptr.h.

## operator<() [2/3]

template<typename _Tp1 , typename _Tp2 >

bool std::experimental::fundamentals_v2::operator< | ( | const shared_ptr< _Tp1 > & | __a,
|  | const shared_ptr< _Tp2 > & | __b
| ) |  |

inline noexcept

Definition at line 291 of file experimental/bits/shared_ptr.h.

## operator<() [3/3]

template<typename _Tp >

bool std::experimental::fundamentals_v2::operator< | ( | nullptr_t | ,
|  | const shared_ptr< _Tp > & | __a
| ) |  |

inline noexcept

Definition at line 310 of file experimental/bits/shared_ptr.h.

## operator<<()

template<typename _Ch , typename _Tr , typename _Tp >

std::basic_ostream< _Ch, _Tr > & std::experimental::fundamentals_v2::operator<< | ( | std::basic_ostream< _Ch, _Tr > & | __os,
|  | const shared_ptr< _Tp > & | __p
| ) |  |

inline

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

## operator<=() [1/3]

template<typename _Tp >

bool std::experimental::fundamentals_v2::operator<= | ( | const shared_ptr< _Tp > & | __a,
|  | nullptr_t |
| ) |  |

inline noexcept

Definition at line 324 of file experimental/bits/shared_ptr.h.

## operator<=() [2/3]

template<typename _Tp1 , typename _Tp2 >

bool std::experimental::fundamentals_v2::operator<= | ( | const shared_ptr< _Tp1 > & | __a,
|  | const shared_ptr< _Tp2 > & | __b
| ) |  |

inline noexcept

Definition at line 318 of file experimental/bits/shared_ptr.h.

## operator<=() [3/3]

template<typename _Tp >

bool std::experimental::fundamentals_v2::operator<= | ( | nullptr_t | ,
|  | const shared_ptr< _Tp > & | __a
| ) |  |

inline noexcept

Definition at line 329 of file experimental/bits/shared_ptr.h.

## operator==() [1/3]

template<typename _Tp >

bool std::experimental::fundamentals_v2::operator== | ( | const shared_ptr< _Tp > & | __a,
|  | nullptr_t |
| ) |  |

inline noexcept

Definition at line 266 of file experimental/bits/shared_ptr.h.

## operator==() [2/3]

template<typename _Tp1 , typename _Tp2 >

bool std::experimental::fundamentals_v2::operator== | ( | const shared_ptr< _Tp1 > & | __a,
|  | const shared_ptr< _Tp2 > & | __b
| ) |  |

noexcept

Definition at line 260 of file experimental/bits/shared_ptr.h.

## operator==() [3/3]

template<typename _Tp >

bool std::experimental::fundamentals_v2::operator== | ( | nullptr_t | ,
|  | const shared_ptr< _Tp > & | __a
| ) |  |

inline noexcept

Definition at line 271 of file experimental/bits/shared_ptr.h.

## operator>() [1/3]

template<typename _Tp >

bool std::experimental::fundamentals_v2::operator> | ( | const shared_ptr< _Tp > & | __a,
|  | nullptr_t |
| ) |  |

inline noexcept

Definition at line 341 of file experimental/bits/shared_ptr.h.

## operator>() [2/3]

template<typename _Tp1 , typename _Tp2 >

bool std::experimental::fundamentals_v2::operator> | ( | const shared_ptr< _Tp1 > & | __a,
|  | const shared_ptr< _Tp2 > & | __b
| ) |  |

inline noexcept

Definition at line 335 of file experimental/bits/shared_ptr.h.

## operator>() [3/3]

template<typename _Tp >

bool std::experimental::fundamentals_v2::operator> | ( | nullptr_t | ,
|  | const shared_ptr< _Tp > & | __a
| ) |  |

inline noexcept

Definition at line 349 of file experimental/bits/shared_ptr.h.

## operator>=() [1/3]

template<typename _Tp >

bool std::experimental::fundamentals_v2::operator>= | ( | const shared_ptr< _Tp > & | __a,
|  | nullptr_t |
| ) |  |

inline noexcept

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

## operator>=() [2/3]

template<typename _Tp1 , typename _Tp2 >

bool std::experimental::fundamentals_v2::operator>= | ( | const shared_ptr< _Tp1 > & | __a,
|  | const shared_ptr< _Tp2 > & | __b
| ) |  |

inline noexcept

Definition at line 357 of file experimental/bits/shared_ptr.h.

## operator>=() [3/3]

template<typename _Tp >

bool std::experimental::fundamentals_v2::operator>= | ( | nullptr_t | ,
|  | const shared_ptr< _Tp > & | __a
| ) |  |

inline noexcept

Definition at line 368 of file experimental/bits/shared_ptr.h.

## reinterpret_pointer_cast()

template<typename _Tp , typename _Tp1 >

shared_ptr< _Tp > std::experimental::fundamentals_v2::reinterpret_pointer_cast | ( | const shared_ptr< _Tp1 > & | __r | ) |

inline noexcept

Definition at line 406 of file experimental/bits/shared_ptr.h.

## static_pointer_cast()

template<typename _Tp , typename _Tp1 >

shared_ptr< _Tp > std::experimental::fundamentals_v2::static_pointer_cast | ( | const shared_ptr< _Tp1 > & | __r | ) |

inline noexcept

Definition at line 380 of file experimental/bits/shared_ptr.h.

## swap() [1/2]

template<typename _Tp >

void std::experimental::fundamentals_v2::swap | ( | shared_ptr< _Tp > & | __a,
|  | shared_ptr< _Tp > & | __b
| ) |  |

inline noexcept

Definition at line 374 of file experimental/bits/shared_ptr.h.

## swap() [2/2]

template<typename _Tp >

void std::experimental::fundamentals_v2::swap | ( | weak_ptr< _Tp > & | __a,
|  | weak_ptr< _Tp > & | __b
| ) |  |

inline noexcept

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

## Variable Documentation

## __sp_compatible_v

template<typename _Yp , typename _Tp >

constexpr bool std::experimental::fundamentals_v2::__sp_compatible_v

constexpr

Definition at line 55 of file experimental/bits/shared_ptr.h.

## __sp_is_constructible_v

template<typename _Tp , typename _Yp >

constexpr bool std::experimental::fundamentals_v2::__sp_is_constructible_v

constexpr

Definition at line 59 of file experimental/bits/shared_ptr.h.