std::atomic< _Tp * > Struct Template Reference
Atomics

`#include <atomic>`

## Public Types

typedef __atomic_base< _Tp * > | __base_type
typedef _Tp * | __pointer_type
using | difference_type = ptrdiff_t
using | value_type = _Tp *

## Public Member Functions

constexpr | atomic (__pointer_type __p) noexcept
| atomic (const atomic &)=delete
bool | compare_exchange_strong (__pointer_type &__p1, __pointer_type __p2, memory_order __m1, memory_order __m2) noexcept
bool | compare_exchange_strong (__pointer_type &__p1, __pointer_type __p2, memory_order __m1, memory_order __m2) volatile noexcept
bool | compare_exchange_strong (__pointer_type &__p1, __pointer_type __p2, memory_order __m=memory_order_seq_cst) noexcept
bool | compare_exchange_strong (__pointer_type &__p1, __pointer_type __p2, memory_order __m=memory_order_seq_cst) volatile noexcept
bool | compare_exchange_weak (__pointer_type &__p1, __pointer_type __p2, memory_order __m1, memory_order __m2) noexcept
bool | compare_exchange_weak (__pointer_type &__p1, __pointer_type __p2, memory_order __m1, memory_order __m2) volatile noexcept
bool | compare_exchange_weak (__pointer_type &__p1, __pointer_type __p2, memory_order __m=memory_order_seq_cst) noexcept
bool | compare_exchange_weak (__pointer_type &__p1, __pointer_type __p2, memory_order __m=memory_order_seq_cst) volatile noexcept
__pointer_type | exchange (__pointer_type __p, memory_order __m=memory_order_seq_cst) noexcept
__pointer_type | exchange (__pointer_type __p, memory_order __m=memory_order_seq_cst) volatile noexcept
__pointer_type | fetch_add (ptrdiff_t __d, memory_order __m=memory_order_seq_cst) noexcept
__pointer_type | fetch_add (ptrdiff_t __d, memory_order __m=memory_order_seq_cst) volatile noexcept
__pointer_type | fetch_sub (ptrdiff_t __d, memory_order __m=memory_order_seq_cst) noexcept
__pointer_type | fetch_sub (ptrdiff_t __d, memory_order __m=memory_order_seq_cst) volatile noexcept
bool | is_lock_free () const noexcept
bool | is_lock_free () const volatile noexcept
__pointer_type | load (memory_order __m=memory_order_seq_cst) const noexcept
__pointer_type | load (memory_order __m=memory_order_seq_cst) const volatile noexcept
void | notify_all () noexcept
void | notify_one () noexcept
| operator __pointer_type () const noexcept
| operator __pointer_type () const volatile noexcept
__pointer_type | operator++ () noexcept
__pointer_type | operator++ () volatile noexcept
__pointer_type | operator++ (int) noexcept
__pointer_type | operator++ (int) volatile noexcept
__pointer_type | operator+= (ptrdiff_t __d) noexcept
__pointer_type | operator+= (ptrdiff_t __d) volatile noexcept
__pointer_type | operator-- () noexcept
__pointer_type | operator-- () volatile noexcept
__pointer_type | operator-- (int) noexcept
__pointer_type | operator-- (int) volatile noexcept
__pointer_type | operator-= (ptrdiff_t __d) noexcept
__pointer_type | operator-= (ptrdiff_t __d) volatile noexcept
__pointer_type | operator= (__pointer_type __p) noexcept
__pointer_type | operator= (__pointer_type __p) volatile noexcept
atomic & | operator= (const atomic &) volatile=delete
atomic & | operator= (const atomic &)=delete
void | store (__pointer_type __p, memory_order __m=memory_order_seq_cst) noexcept
void | store (__pointer_type __p, memory_order __m=memory_order_seq_cst) volatile noexcept
void | wait (__pointer_type __old, memory_order __m=memory_order_seq_cst) const noexcept

## Public Attributes

__base_type | _M_b

## Static Public Attributes

static constexpr bool | is_always_lock_free

## Detailed Description

template<typename _Tp>
struct std::atomic< _Tp * >

Partial specialization for pointer types.

Definition at line 417 of file atomic.

## Member Typedef Documentation

## __base_type

template<typename _Tp >

typedef __atomic_base<_Tp*> std::atomic< _Tp * >::__base_type

Definition at line 423 of file atomic.

## __pointer_type

template<typename _Tp >

typedef _Tp* std::atomic< _Tp * >::__pointer_type

Definition at line 422 of file atomic.

## difference_type

template<typename _Tp >

using std::atomic< _Tp * >::difference_type = ptrdiff_t

Definition at line 420 of file atomic.

## value_type

template<typename _Tp >

using std::atomic< _Tp * >::value_type = _Tp*

Definition at line 419 of file atomic.

## Constructor & Destructor Documentation

## atomic()

template<typename _Tp >

constexpr std::atomic< _Tp * >::atomic | ( | __pointer_type | __p | ) |

inline constexpr noexcept

Definition at line 432 of file atomic.

## Member Function Documentation

## compare_exchange_strong() [1/4]

template<typename _Tp >

bool std::atomic< _Tp * >::compare_exchange_strong | ( | __pointer_type & | __p1,
|  | __pointer_type | __p2,
|  | memory_order | __m1,
|  | memory_order | __m2
| ) |  |

inline noexcept

Definition at line 625 of file atomic.

## compare_exchange_strong() [2/4]

template<typename _Tp >

bool std::atomic< _Tp * >::compare_exchange_strong | ( | __pointer_type & | __p1,
|  | __pointer_type | __p2,
|  | memory_order | __m1,
|  | memory_order | __m2
| ) |  | volatile

inline noexcept

Definition at line 630 of file atomic.

## compare_exchange_strong() [3/4]

template<typename _Tp >

bool std::atomic< _Tp * >::compare_exchange_strong | ( | __pointer_type & | __p1,
|  | __pointer_type | __p2,
|  | memory_order | __m = `memory_order_seq_cst`
| ) |  |

inline noexcept

Definition at line 636 of file atomic.

## compare_exchange_strong() [4/4]

template<typename _Tp >

bool std::atomic< _Tp * >::compare_exchange_strong | ( | __pointer_type & | __p1,
|  | __pointer_type | __p2,
|  | memory_order | __m = `memory_order_seq_cst`
| ) |  | volatile

inline noexcept

Definition at line 644 of file atomic.

## compare_exchange_weak() [1/4]

template<typename _Tp >

bool std::atomic< _Tp * >::compare_exchange_weak | ( | __pointer_type & | __p1,
|  | __pointer_type | __p2,
|  | memory_order | __m1,
|  | memory_order | __m2
| ) |  |

inline noexcept

Definition at line 598 of file atomic.

## compare_exchange_weak() [2/4]

template<typename _Tp >

bool std::atomic< _Tp * >::compare_exchange_weak | ( | __pointer_type & | __p1,
|  | __pointer_type | __p2,
|  | memory_order | __m1,
|  | memory_order | __m2
| ) |  | volatile

inline noexcept

Definition at line 603 of file atomic.

## compare_exchange_weak() [3/4]

template<typename _Tp >

bool std::atomic< _Tp * >::compare_exchange_weak | ( | __pointer_type & | __p1,
|  | __pointer_type | __p2,
|  | memory_order | __m = `memory_order_seq_cst`
| ) |  |

inline noexcept

Definition at line 609 of file atomic.

## compare_exchange_weak() [4/4]

template<typename _Tp >

bool std::atomic< _Tp * >::compare_exchange_weak | ( | __pointer_type & | __p1,
|  | __pointer_type | __p2,
|  | memory_order | __m = `memory_order_seq_cst`
| ) |  | volatile

inline noexcept

Definition at line 617 of file atomic.

## exchange() [1/2]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::exchange | ( | __pointer_type | __p,
|  | memory_order | __m = `memory_order_seq_cst`
| ) |  |

inline noexcept

Definition at line 588 of file atomic.

## exchange() [2/2]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::exchange | ( | __pointer_type | __p,
|  | memory_order | __m = `memory_order_seq_cst`
| ) |  | volatile

inline noexcept

Definition at line 593 of file atomic.

## fetch_add() [1/2]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::fetch_add | ( | ptrdiff_t | __d,
|  | memory_order | __m = `memory_order_seq_cst`
| ) |  |

inline noexcept

Definition at line 668 of file atomic.

## fetch_add() [2/2]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::fetch_add | ( | ptrdiff_t | __d,
|  | memory_order | __m = `memory_order_seq_cst`
| ) |  | volatile

inline noexcept

Definition at line 678 of file atomic.

## fetch_sub() [1/2]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::fetch_sub | ( | ptrdiff_t | __d,
|  | memory_order | __m = `memory_order_seq_cst`
| ) |  |

inline noexcept

Definition at line 688 of file atomic.

## fetch_sub() [2/2]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::fetch_sub | ( | ptrdiff_t | __d,
|  | memory_order | __m = `memory_order_seq_cst`
| ) |  | volatile

inline noexcept

Definition at line 698 of file atomic.

## is_lock_free() [1/2]

template<typename _Tp >

bool std::atomic< _Tp * >::is_lock_free | ( |  | ) | const

inline noexcept

Definition at line 557 of file atomic.

## is_lock_free() [2/2]

template<typename _Tp >

bool std::atomic< _Tp * >::is_lock_free | ( |  | ) | const volatile

inline noexcept

Definition at line 561 of file atomic.

## load() [1/2]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::load | ( | memory_order | __m = `memory_order_seq_cst` | ) | const

inline noexcept

Definition at line 580 of file atomic.

## load() [2/2]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::load | ( | memory_order | __m = `memory_order_seq_cst` | ) | const volatile

inline noexcept

Definition at line 584 of file atomic.

## notify_all()

template<typename _Tp >

void std::atomic< _Tp * >::notify_all | ( |  | ) |

inline noexcept

Definition at line 663 of file atomic.

## notify_one()

template<typename _Tp >

void std::atomic< _Tp * >::notify_one | ( |  | ) |

inline noexcept

Definition at line 659 of file atomic.

## operator __pointer_type() [1/2]

template<typename _Tp >

std::atomic< _Tp * >::operator __pointer_type | ( |  | ) | const

inline noexcept

Definition at line 434 of file atomic.

## operator __pointer_type() [2/2]

template<typename _Tp >

std::atomic< _Tp * >::operator __pointer_type | ( |  | ) | const volatile

inline noexcept

Definition at line 437 of file atomic.

## operator++() [1/4]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::operator++ | ( |  | ) |

inline noexcept

Definition at line 485 of file atomic.

## operator++() [2/4]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::operator++ | ( |  | ) | volatile

inline noexcept

Definition at line 494 of file atomic.

## operator++() [3/4]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::operator++ | ( | int |  | ) |

inline noexcept

Definition at line 449 of file atomic.

## operator++() [4/4]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::operator++ | ( | int |  | ) | volatile

inline noexcept

Definition at line 458 of file atomic.

## operator+=() [1/2]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::operator+= | ( | ptrdiff_t | __d | ) |

inline noexcept

Definition at line 521 of file atomic.

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

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::operator+= | ( | ptrdiff_t | __d | ) | volatile

inline noexcept

Definition at line 530 of file atomic.

## operator--() [1/4]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::operator-- | ( |  | ) |

inline noexcept

Definition at line 503 of file atomic.

## operator--() [2/4]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::operator-- | ( |  | ) | volatile

inline noexcept

Definition at line 512 of file atomic.

## operator--() [3/4]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::operator-- | ( | int |  | ) |

inline noexcept

Definition at line 467 of file atomic.

## operator--() [4/4]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::operator-- | ( | int |  | ) | volatile

inline noexcept

Definition at line 476 of file atomic.

## operator-=() [1/2]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::operator-= | ( | ptrdiff_t | __d | ) |

inline noexcept

Definition at line 539 of file atomic.

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

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::operator-= | ( | ptrdiff_t | __d | ) | volatile

inline noexcept

Definition at line 548 of file atomic.

## operator=() [1/2]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::operator= | ( | __pointer_type | __p | ) |

inline noexcept

Definition at line 441 of file atomic.

## operator=() [2/2]

template<typename _Tp >

__pointer_type std::atomic< _Tp * >::operator= | ( | __pointer_type | __p | ) | volatile

inline noexcept

Definition at line 445 of file atomic.

## store() [1/2]

template<typename _Tp >

void std::atomic< _Tp * >::store | ( | __pointer_type | __p,
|  | memory_order | __m = `memory_order_seq_cst`
| ) |  |

inline noexcept

Definition at line 570 of file atomic.

## store() [2/2]

template<typename _Tp >

void std::atomic< _Tp * >::store | ( | __pointer_type | __p,
|  | memory_order | __m = `memory_order_seq_cst`
| ) |  | volatile

inline noexcept

Definition at line 575 of file atomic.

## wait()

template<typename _Tp >

void std::atomic< _Tp * >::wait | ( | __pointer_type | __old,
|  | memory_order | __m = `memory_order_seq_cst`
| ) |  | const

inline noexcept

Definition at line 653 of file atomic.

## Member Data Documentation

## _M_b

template<typename _Tp >

__base_type std::atomic< _Tp * >::_M_b

Definition at line 424 of file atomic.

## is_always_lock_free

template<typename _Tp >

constexpr bool std::atomic< _Tp * >::is_always_lock_free

static constexpr

Definition at line 565 of file atomic.

The documentation for this struct was generated from the following file:

- atomic