libstdc++: std::atomic< _Tp * > Struct Template Reference

libstdc++

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

`#include <atomic>`

## Public Types
typedef __atomic_base< _Tp * > | __base_type
typedef _Tp * | __pointer_type
using | difference_type
using | value_type

## 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_max (__pointer_type __p, memory_order __m=memory_order_seq_cst) noexcept
__pointer_type | fetch_max (__pointer_type __p, memory_order __m=memory_order_seq_cst) volatile noexcept
__pointer_type | fetch_min (__pointer_type __p, memory_order __m=memory_order_seq_cst) noexcept
__pointer_type | fetch_min (__pointer_type __p, 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
| operator __pointer_type () const noexcept
| operator __pointer_type () const volatile noexcept
| operator _Tp () const 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

## Public Attributes
__base_type | _M_b

## Detailed Description

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

Partial specialization for pointer types.

Definition at line 432 of file atomic.

## Member Typedef Documentation

## ◆ __base_type

template<typename _Tp>

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

Definition at line 438 of file atomic.

## ◆ __pointer_type

template<typename _Tp>

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

Definition at line 437 of file atomic.

## ◆ difference_type

template<typename _Tp>

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

Definition at line 435 of file atomic.

## ◆ value_type

template<typename _Tp>

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

Definition at line 434 of file atomic.

## Constructor & Destructor Documentation

## ◆ atomic()

template<typename _Tp>

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

Definition at line 447 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 )
| inlinenoexcept

Definition at line 640 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
| inlinenoexcept

Definition at line 645 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 )
| inlinenoexcept

Definition at line 651 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
| inlinenoexcept

Definition at line 659 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 )
| inlinenoexcept

Definition at line 613 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
| inlinenoexcept

Definition at line 618 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 )
| inlinenoexcept

Definition at line 624 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
| inlinenoexcept

Definition at line 632 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 )
| inlinenoexcept

Definition at line 603 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
| inlinenoexcept

Definition at line 608 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 )
| inlinenoexcept

Definition at line 684 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
| inlinenoexcept

Definition at line 694 of file atomic.

## ◆ fetch_max() [1/2]

template<typename _Tp>

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

Definition at line 735 of file atomic.

## ◆ fetch_max() [2/2]

template<typename _Tp>

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

Definition at line 740 of file atomic.

## ◆ fetch_min() [1/2]

template<typename _Tp>

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

Definition at line 725 of file atomic.

## ◆ fetch_min() [2/2]

template<typename _Tp>

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

Definition at line 730 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 )
| inlinenoexcept

Definition at line 704 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
| inlinenoexcept

Definition at line 714 of file atomic.

## ◆ is_lock_free() [1/2]

template<typename _Tp>

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

Definition at line 572 of file atomic.

## ◆ is_lock_free() [2/2]

template<typename _Tp>

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

Definition at line 576 of file atomic.

## ◆ load() [1/2]

template<typename _Tp>

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

Definition at line 595 of file atomic.

## ◆ load() [2/2]

template<typename _Tp>

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

Definition at line 599 of file atomic.

## ◆ operator __pointer_type() [1/2]

template<typename _Tp>

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

Definition at line 449 of file atomic.

## ◆ operator __pointer_type() [2/2]

template<typename _Tp>

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

Definition at line 452 of file atomic.

## ◆ operator _Tp()

std::atomic< _Tp >::operator _Tp | ( |  | ) | const
| inlinenoexcept

Definition at line 262 of file atomic.

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

template<typename _Tp>

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

Definition at line 500 of file atomic.

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

template<typename _Tp>

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

Definition at line 509 of file atomic.

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

template<typename _Tp>

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

Definition at line 464 of file atomic.

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

template<typename _Tp>

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

Definition at line 473 of file atomic.

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

template<typename _Tp>

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

Definition at line 536 of file atomic.

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

template<typename _Tp>

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

Definition at line 545 of file atomic.

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

template<typename _Tp>

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

Definition at line 518 of file atomic.

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

template<typename _Tp>

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

Definition at line 527 of file atomic.

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

template<typename _Tp>

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

Definition at line 482 of file atomic.

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

template<typename _Tp>

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

Definition at line 491 of file atomic.

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

template<typename _Tp>

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

Definition at line 554 of file atomic.

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

template<typename _Tp>

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

Definition at line 563 of file atomic.

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

template<typename _Tp>

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

Definition at line 456 of file atomic.

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

template<typename _Tp>

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

Definition at line 460 of file atomic.

## ◆ store() [1/2]

template<typename _Tp>

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

Definition at line 585 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
| inlinenoexcept

Definition at line 590 of file atomic.

## Member Data Documentation

## ◆ _M_b

template<typename _Tp>

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

Definition at line 439 of file atomic.

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

- atomic