32#ifndef _GLIBCXX_ATOMIC
33#define _GLIBCXX_ATOMIC 1
36#pragma GCC system_header
39#if __cplusplus < 201103L
43#define __glibcxx_want_atomic_is_always_lock_free
44#define __glibcxx_want_atomic_flag_test
45#define __glibcxx_want_atomic_float
46#define __glibcxx_want_atomic_min_max
47#define __glibcxx_want_atomic_ref
48#define __glibcxx_want_atomic_lock_free_type_aliases
49#define __glibcxx_want_atomic_value_initialization
50#define __glibcxx_want_atomic_wait
57namespace std _GLIBCXX_VISIBILITY(default)
59_GLIBCXX_BEGIN_NAMESPACE_VERSION
66 template<
typename _Tp>
74 using value_type = bool;
77 __atomic_base<bool> _M_base;
80 atomic()
noexcept =
default;
81 ~atomic()
noexcept =
default;
82 atomic(
const atomic&) =
delete;
83 atomic& operator=(
const atomic&) =
delete;
84 atomic& operator=(
const atomic&)
volatile =
delete;
86 constexpr atomic(
bool __i) noexcept : _M_base(__i) { }
89 operator=(
bool __i)
noexcept
90 {
return _M_base.operator=(__i); }
93 operator=(
bool __i)
volatile noexcept
94 {
return _M_base.operator=(__i); }
96 operator bool()
const noexcept
97 {
return _M_base.load(); }
99 operator bool()
const volatile noexcept
100 {
return _M_base.load(); }
103 is_lock_free()
const noexcept {
return _M_base.is_lock_free(); }
106 is_lock_free()
const volatile noexcept {
return _M_base.is_lock_free(); }
108#ifdef __cpp_lib_atomic_is_always_lock_free
112 _GLIBCXX_ALWAYS_INLINE
114 store(
bool __i,
memory_order __m = memory_order_seq_cst)
noexcept
115 { _M_base.store(__i, __m); }
117 _GLIBCXX_ALWAYS_INLINE
119 store(
bool __i,
memory_order __m = memory_order_seq_cst)
volatile noexcept
120 { _M_base.store(__i, __m); }
122 _GLIBCXX_ALWAYS_INLINE
124 load(
memory_order __m = memory_order_seq_cst)
const noexcept
125 {
return _M_base.load(__m); }
127 _GLIBCXX_ALWAYS_INLINE
129 load(
memory_order __m = memory_order_seq_cst)
const volatile noexcept
130 {
return _M_base.load(__m); }
132 _GLIBCXX_ALWAYS_INLINE
134 exchange(
bool __i,
memory_order __m = memory_order_seq_cst)
noexcept
135 {
return _M_base.exchange(__i, __m); }
137 _GLIBCXX_ALWAYS_INLINE
140 memory_order __m = memory_order_seq_cst)
volatile noexcept
141 {
return _M_base.exchange(__i, __m); }
143 _GLIBCXX_ALWAYS_INLINE
145 compare_exchange_weak(
bool& __i1,
bool __i2,
memory_order __m1,
147 {
return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); }
149 _GLIBCXX_ALWAYS_INLINE
151 compare_exchange_weak(
bool& __i1,
bool __i2,
memory_order __m1,
153 {
return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); }
155 _GLIBCXX_ALWAYS_INLINE
157 compare_exchange_weak(
bool& __i1,
bool __i2,
159 {
return _M_base.compare_exchange_weak(__i1, __i2, __m); }
161 _GLIBCXX_ALWAYS_INLINE
163 compare_exchange_weak(
bool& __i1,
bool __i2,
164 memory_order __m = memory_order_seq_cst)
volatile noexcept
165 {
return _M_base.compare_exchange_weak(__i1, __i2, __m); }
167 _GLIBCXX_ALWAYS_INLINE
169 compare_exchange_strong(
bool& __i1,
bool __i2,
memory_order __m1,
171 {
return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); }
173 _GLIBCXX_ALWAYS_INLINE
175 compare_exchange_strong(
bool& __i1,
bool __i2,
memory_order __m1,
177 {
return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); }
179 _GLIBCXX_ALWAYS_INLINE
181 compare_exchange_strong(
bool& __i1,
bool __i2,
183 {
return _M_base.compare_exchange_strong(__i1, __i2, __m); }
185 _GLIBCXX_ALWAYS_INLINE
187 compare_exchange_strong(
bool& __i1,
bool __i2,
188 memory_order __m = memory_order_seq_cst)
volatile noexcept
189 {
return _M_base.compare_exchange_strong(__i1, __i2, __m); }
191#if __cpp_lib_atomic_wait
192 _GLIBCXX_ALWAYS_INLINE
194 wait(
bool __old,
memory_order __m = memory_order_seq_cst)
const noexcept
195 { _M_base.wait(__old, __m); }
200 notify_one()
noexcept
201 { _M_base.notify_one(); }
204 notify_all()
noexcept
205 { _M_base.notify_all(); }
214 template<
typename _Tp>
217 using value_type = _Tp;
221 static constexpr int _S_min_alignment
222 = (
sizeof(_Tp) & (
sizeof(_Tp) - 1)) ||
sizeof(_Tp) > 16
225 static constexpr int _S_alignment
226 = _S_min_alignment >
alignof(_Tp) ? _S_min_alignment :
alignof(_Tp);
228 alignas(_S_alignment) _Tp _M_i;
230 static_assert(__is_trivially_copyable(_Tp),
231 "std::atomic requires a trivially copyable type");
233 static_assert(
sizeof(_Tp) > 0,
234 "Incomplete or zero-sized types are not supported");
239 "template argument for std::atomic must not be const or volatile");
241#if __cplusplus > 201703L
242 static_assert(is_copy_constructible_v<_Tp>);
243 static_assert(is_move_constructible_v<_Tp>);
244 static_assert(is_copy_assignable_v<_Tp>);
245 static_assert(is_move_assignable_v<_Tp>);
249#if __cpp_lib_atomic_value_initialization
252 constexpr atomic()
noexcept(is_nothrow_default_constructible_v<_Tp>)
253 requires is_default_constructible_v<_Tp>
260 ~atomic()
noexcept =
default;
261 atomic(
const atomic&) =
delete;
262 atomic& operator=(
const atomic&) =
delete;
263 atomic& operator=(
const atomic&)
volatile =
delete;
265#pragma GCC diagnostic push
266#pragma GCC diagnostic ignored "-Wc++14-extensions"
267 constexpr atomic(_Tp __i) noexcept : _M_i(__i)
269#if __has_builtin(__builtin_clear_padding)
270 if _GLIBCXX17_CONSTEXPR (__atomic_impl::__maybe_has_padding<_Tp>())
271 if (!std::__is_constant_evaluated())
275#pragma GCC diagnostic pop
277 operator _Tp()
const noexcept
280 operator _Tp()
const volatile noexcept
284 operator=(_Tp __i)
noexcept
285 { store(__i);
return __i; }
288 operator=(_Tp __i)
volatile noexcept
289 { store(__i);
return __i; }
292 is_lock_free()
const noexcept
295 return __atomic_is_lock_free(
sizeof(_M_i),
296 reinterpret_cast<void *
>(-_S_alignment));
300 is_lock_free()
const volatile noexcept
303 return __atomic_is_lock_free(
sizeof(_M_i),
304 reinterpret_cast<void *
>(-_S_alignment));
307#ifdef __cpp_lib_atomic_is_always_lock_free
308 static constexpr bool is_always_lock_free
309 = __atomic_always_lock_free(
sizeof(_M_i), 0);
312 _GLIBCXX_ALWAYS_INLINE
314 store(_Tp __i,
memory_order __m = memory_order_seq_cst)
noexcept
317 __atomic_impl::__clear_padding(__i),
321 _GLIBCXX_ALWAYS_INLINE
323 store(_Tp __i,
memory_order __m = memory_order_seq_cst)
volatile noexcept
326 __atomic_impl::__clear_padding(__i),
330 _GLIBCXX_ALWAYS_INLINE
332 load(
memory_order __m = memory_order_seq_cst)
const noexcept
334 alignas(_Tp)
unsigned char __buf[
sizeof(_Tp)];
335 _Tp* __ptr =
reinterpret_cast<_Tp*
>(__buf);
340 _GLIBCXX_ALWAYS_INLINE
342 load(
memory_order __m = memory_order_seq_cst)
const volatile noexcept
344 alignas(_Tp)
unsigned char __buf[
sizeof(_Tp)];
345 _Tp* __ptr =
reinterpret_cast<_Tp*
>(__buf);
350 _GLIBCXX_ALWAYS_INLINE
352 exchange(_Tp __i,
memory_order __m = memory_order_seq_cst)
noexcept
354 alignas(_Tp)
unsigned char __buf[
sizeof(_Tp)];
355 _Tp* __ptr =
reinterpret_cast<_Tp*
>(__buf);
357 __atomic_impl::__clear_padding(__i),
362 _GLIBCXX_ALWAYS_INLINE
365 memory_order __m = memory_order_seq_cst)
volatile noexcept
367 alignas(_Tp)
unsigned char __buf[
sizeof(_Tp)];
368 _Tp* __ptr =
reinterpret_cast<_Tp*
>(__buf);
370 __atomic_impl::__clear_padding(__i),
375 _GLIBCXX_ALWAYS_INLINE
377 compare_exchange_weak(_Tp& __e, _Tp __i,
memory_order __s,
380 return __atomic_impl::__compare_exchange(_M_i, __e, __i,
true,
384 _GLIBCXX_ALWAYS_INLINE
386 compare_exchange_weak(_Tp& __e, _Tp __i,
memory_order __s,
389 return __atomic_impl::__compare_exchange(_M_i, __e, __i,
true,
393 _GLIBCXX_ALWAYS_INLINE
395 compare_exchange_weak(_Tp& __e, _Tp __i,
397 {
return compare_exchange_weak(__e, __i, __m,
398 __cmpexch_failure_order(__m)); }
400 _GLIBCXX_ALWAYS_INLINE
402 compare_exchange_weak(_Tp& __e, _Tp __i,
403 memory_order __m = memory_order_seq_cst)
volatile noexcept
404 {
return compare_exchange_weak(__e, __i, __m,
405 __cmpexch_failure_order(__m)); }
407 _GLIBCXX_ALWAYS_INLINE
409 compare_exchange_strong(_Tp& __e, _Tp __i,
memory_order __s,
412 return __atomic_impl::__compare_exchange(_M_i, __e, __i,
false,
416 _GLIBCXX_ALWAYS_INLINE
418 compare_exchange_strong(_Tp& __e, _Tp __i,
memory_order __s,
421 return __atomic_impl::__compare_exchange(_M_i, __e, __i,
false,
425 _GLIBCXX_ALWAYS_INLINE
427 compare_exchange_strong(_Tp& __e, _Tp __i,
429 {
return compare_exchange_strong(__e, __i, __m,
430 __cmpexch_failure_order(__m)); }
432 _GLIBCXX_ALWAYS_INLINE
434 compare_exchange_strong(_Tp& __e, _Tp __i,
435 memory_order __m = memory_order_seq_cst)
volatile noexcept
436 {
return compare_exchange_strong(__e, __i, __m,
437 __cmpexch_failure_order(__m)); }
439#if __cpp_lib_atomic_wait
440 _GLIBCXX_ALWAYS_INLINE
442 wait(_Tp __old,
memory_order __m = memory_order_seq_cst)
const noexcept
445 [__m,
this] {
return this->load(__m); });
451 notify_one()
noexcept
455 notify_all()
noexcept
461 template<
typename _Tp>
464 using value_type = _Tp*;
465 using difference_type = ptrdiff_t;
467 typedef _Tp* __pointer_type;
468 typedef __atomic_base<_Tp*> __base_type;
471 atomic()
noexcept =
default;
472 ~atomic()
noexcept =
default;
473 atomic(
const atomic&) =
delete;
474 atomic& operator=(
const atomic&) =
delete;
475 atomic& operator=(
const atomic&)
volatile =
delete;
477 constexpr atomic(__pointer_type __p) noexcept : _M_b(__p) { }
479 operator __pointer_type()
const noexcept
480 {
return __pointer_type(_M_b); }
482 operator __pointer_type()
const volatile noexcept
483 {
return __pointer_type(_M_b); }
486 operator=(__pointer_type __p)
noexcept
487 {
return _M_b.operator=(__p); }
490 operator=(__pointer_type __p)
volatile noexcept
491 {
return _M_b.operator=(__p); }
494 operator++(
int)
noexcept
496#if __cplusplus >= 201703L
497 static_assert( is_object_v<_Tp>,
"pointer to object type" );
503 operator++(
int)
volatile noexcept
505#if __cplusplus >= 201703L
506 static_assert( is_object_v<_Tp>,
"pointer to object type" );
512 operator--(
int)
noexcept
514#if __cplusplus >= 201703L
515 static_assert( is_object_v<_Tp>,
"pointer to object type" );
521 operator--(
int)
volatile noexcept
523#if __cplusplus >= 201703L
524 static_assert( is_object_v<_Tp>,
"pointer to object type" );
530 operator++()
noexcept
532#if __cplusplus >= 201703L
533 static_assert( is_object_v<_Tp>,
"pointer to object type" );
539 operator++()
volatile noexcept
541#if __cplusplus >= 201703L
542 static_assert( is_object_v<_Tp>,
"pointer to object type" );
548 operator--()
noexcept
550#if __cplusplus >= 201703L
551 static_assert( is_object_v<_Tp>,
"pointer to object type" );
557 operator--()
volatile noexcept
559#if __cplusplus >= 201703L
560 static_assert( is_object_v<_Tp>,
"pointer to object type" );
566 operator+=(ptrdiff_t __d)
noexcept
568#if __cplusplus >= 201703L
569 static_assert( is_object_v<_Tp>,
"pointer to object type" );
571 return _M_b.operator+=(__d);
575 operator+=(ptrdiff_t __d)
volatile noexcept
577#if __cplusplus >= 201703L
578 static_assert( is_object_v<_Tp>,
"pointer to object type" );
580 return _M_b.operator+=(__d);
584 operator-=(ptrdiff_t __d)
noexcept
586#if __cplusplus >= 201703L
587 static_assert( is_object_v<_Tp>,
"pointer to object type" );
589 return _M_b.operator-=(__d);
593 operator-=(ptrdiff_t __d)
volatile noexcept
595#if __cplusplus >= 201703L
596 static_assert( is_object_v<_Tp>,
"pointer to object type" );
598 return _M_b.operator-=(__d);
602 is_lock_free()
const noexcept
603 {
return _M_b.is_lock_free(); }
606 is_lock_free()
const volatile noexcept
607 {
return _M_b.is_lock_free(); }
609#ifdef __cpp_lib_atomic_is_always_lock_free
610 static constexpr bool is_always_lock_free
611 = ATOMIC_POINTER_LOCK_FREE == 2;
614 _GLIBCXX_ALWAYS_INLINE
616 store(__pointer_type __p,
618 {
return _M_b.store(__p, __m); }
620 _GLIBCXX_ALWAYS_INLINE
622 store(__pointer_type __p,
623 memory_order __m = memory_order_seq_cst)
volatile noexcept
624 {
return _M_b.store(__p, __m); }
626 _GLIBCXX_ALWAYS_INLINE
628 load(
memory_order __m = memory_order_seq_cst)
const noexcept
629 {
return _M_b.load(__m); }
631 _GLIBCXX_ALWAYS_INLINE
633 load(
memory_order __m = memory_order_seq_cst)
const volatile noexcept
634 {
return _M_b.load(__m); }
636 _GLIBCXX_ALWAYS_INLINE
638 exchange(__pointer_type __p,
640 {
return _M_b.exchange(__p, __m); }
642 _GLIBCXX_ALWAYS_INLINE
644 exchange(__pointer_type __p,
645 memory_order __m = memory_order_seq_cst)
volatile noexcept
646 {
return _M_b.exchange(__p, __m); }
648 _GLIBCXX_ALWAYS_INLINE
650 compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2,
652 {
return _M_b.compare_exchange_weak(__p1, __p2, __m1, __m2); }
654 _GLIBCXX_ALWAYS_INLINE
656 compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2,
659 {
return _M_b.compare_exchange_weak(__p1, __p2, __m1, __m2); }
661 _GLIBCXX_ALWAYS_INLINE
663 compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2,
666 return compare_exchange_weak(__p1, __p2, __m,
667 __cmpexch_failure_order(__m));
670 _GLIBCXX_ALWAYS_INLINE
672 compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2,
673 memory_order __m = memory_order_seq_cst)
volatile noexcept
675 return compare_exchange_weak(__p1, __p2, __m,
676 __cmpexch_failure_order(__m));
679 _GLIBCXX_ALWAYS_INLINE
681 compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2,
683 {
return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); }
685 _GLIBCXX_ALWAYS_INLINE
687 compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2,
690 {
return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); }
692 _GLIBCXX_ALWAYS_INLINE
694 compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2,
697 return _M_b.compare_exchange_strong(__p1, __p2, __m,
698 __cmpexch_failure_order(__m));
701 _GLIBCXX_ALWAYS_INLINE
703 compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2,
704 memory_order __m = memory_order_seq_cst)
volatile noexcept
706 return _M_b.compare_exchange_strong(__p1, __p2, __m,
707 __cmpexch_failure_order(__m));
710#if __cpp_lib_atomic_wait
711 _GLIBCXX_ALWAYS_INLINE
713 wait(__pointer_type __old,
715 { _M_b.wait(__old, __m); }
720 notify_one()
noexcept
721 { _M_b.notify_one(); }
724 notify_all()
noexcept
725 { _M_b.notify_all(); }
728 _GLIBCXX_ALWAYS_INLINE
730 fetch_add(ptrdiff_t __d,
733#if __cplusplus >= 201703L
734 static_assert( is_object_v<_Tp>,
"pointer to object type" );
736 return _M_b.fetch_add(__d, __m);
739 _GLIBCXX_ALWAYS_INLINE
741 fetch_add(ptrdiff_t __d,
742 memory_order __m = memory_order_seq_cst)
volatile noexcept
744#if __cplusplus >= 201703L
745 static_assert( is_object_v<_Tp>,
"pointer to object type" );
747 return _M_b.fetch_add(__d, __m);
750 _GLIBCXX_ALWAYS_INLINE
752 fetch_sub(ptrdiff_t __d,
755#if __cplusplus >= 201703L
756 static_assert( is_object_v<_Tp>,
"pointer to object type" );
758 return _M_b.fetch_sub(__d, __m);
761 _GLIBCXX_ALWAYS_INLINE
763 fetch_sub(ptrdiff_t __d,
764 memory_order __m = memory_order_seq_cst)
volatile noexcept
766#if __cplusplus >= 201703L
767 static_assert( is_object_v<_Tp>,
"pointer to object type" );
769 return _M_b.fetch_sub(__d, __m);
772#if __glibcxx_atomic_min_max
773 _GLIBCXX_ALWAYS_INLINE
775 fetch_min(__pointer_type __p,
777 {
return _M_b.fetch_min(__p, __m); }
779 _GLIBCXX_ALWAYS_INLINE
781 fetch_min(__pointer_type __p,
782 memory_order __m = memory_order_seq_cst)
volatile noexcept
783 {
return _M_b.fetch_min(__p, __m); }
785 _GLIBCXX_ALWAYS_INLINE
787 fetch_max(__pointer_type __p,
789 {
return _M_b.fetch_max(__p, __m); }
791 _GLIBCXX_ALWAYS_INLINE
793 fetch_max(__pointer_type __p,
794 memory_order __m = memory_order_seq_cst)
volatile noexcept
795 {
return _M_b.fetch_max(__p, __m); }
802 struct atomic<char> : __atomic_base<char>
804 typedef char __integral_type;
805 typedef __atomic_base<char> __base_type;
807 atomic()
noexcept =
default;
808 ~atomic()
noexcept =
default;
809 atomic(
const atomic&) =
delete;
810 atomic& operator=(
const atomic&) =
delete;
811 atomic& operator=(
const atomic&)
volatile =
delete;
813 constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
815 using __base_type::operator __integral_type;
816 using __base_type::operator=;
818#ifdef __cpp_lib_atomic_is_always_lock_free
819 static constexpr bool is_always_lock_free = ATOMIC_CHAR_LOCK_FREE == 2;
825 struct atomic<signed char> : __atomic_base<signed char>
827 typedef signed char __integral_type;
828 typedef __atomic_base<signed char> __base_type;
830 atomic()
noexcept=
default;
831 ~atomic()
noexcept =
default;
832 atomic(
const atomic&) =
delete;
833 atomic& operator=(
const atomic&) =
delete;
834 atomic& operator=(
const atomic&)
volatile =
delete;
836 constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
838 using __base_type::operator __integral_type;
839 using __base_type::operator=;
841#ifdef __cpp_lib_atomic_is_always_lock_free
842 static constexpr bool is_always_lock_free = ATOMIC_CHAR_LOCK_FREE == 2;
848 struct atomic<unsigned char> : __atomic_base<unsigned char>
850 typedef unsigned char __integral_type;
851 typedef __atomic_base<unsigned char> __base_type;
853 atomic()
noexcept=
default;
854 ~atomic()
noexcept =
default;
855 atomic(
const atomic&) =
delete;
856 atomic& operator=(
const atomic&) =
delete;
857 atomic& operator=(
const atomic&)
volatile =
delete;
859 constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
861 using __base_type::operator __integral_type;
862 using __base_type::operator=;
864#ifdef __cpp_lib_atomic_is_always_lock_free
865 static constexpr bool is_always_lock_free = ATOMIC_CHAR_LOCK_FREE == 2;
871 struct atomic<short> : __atomic_base<short>
873 typedef short __integral_type;
874 typedef __atomic_base<short> __base_type;
876 atomic()
noexcept =
default;
877 ~atomic()
noexcept =
default;
878 atomic(
const atomic&) =
delete;
879 atomic& operator=(
const atomic&) =
delete;
880 atomic& operator=(
const atomic&)
volatile =
delete;
882 constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
884 using __base_type::operator __integral_type;
885 using __base_type::operator=;
887#ifdef __cpp_lib_atomic_is_always_lock_free
888 static constexpr bool is_always_lock_free = ATOMIC_SHORT_LOCK_FREE == 2;
894 struct atomic<unsigned short> : __atomic_base<unsigned short>
896 typedef unsigned short __integral_type;
897 typedef __atomic_base<unsigned short> __base_type;
899 atomic()
noexcept =
default;
900 ~atomic()
noexcept =
default;
901 atomic(
const atomic&) =
delete;
902 atomic& operator=(
const atomic&) =
delete;
903 atomic& operator=(
const atomic&)
volatile =
delete;
905 constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
907 using __base_type::operator __integral_type;
908 using __base_type::operator=;
910#ifdef __cpp_lib_atomic_is_always_lock_free
911 static constexpr bool is_always_lock_free = ATOMIC_SHORT_LOCK_FREE == 2;
917 struct atomic<int> : __atomic_base<int>
919 typedef int __integral_type;
920 typedef __atomic_base<int> __base_type;
922 atomic()
noexcept =
default;
923 ~atomic()
noexcept =
default;
924 atomic(
const atomic&) =
delete;
925 atomic& operator=(
const atomic&) =
delete;
926 atomic& operator=(
const atomic&)
volatile =
delete;
928 constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
930 using __base_type::operator __integral_type;
931 using __base_type::operator=;
933#ifdef __cpp_lib_atomic_is_always_lock_free
934 static constexpr bool is_always_lock_free = ATOMIC_INT_LOCK_FREE == 2;
940 struct atomic<unsigned int> : __atomic_base<unsigned int>
942 typedef unsigned int __integral_type;
943 typedef __atomic_base<unsigned int> __base_type;
945 atomic()
noexcept =
default;
946 ~atomic()
noexcept =
default;
947 atomic(
const atomic&) =
delete;
948 atomic& operator=(
const atomic&) =
delete;
949 atomic& operator=(
const atomic&)
volatile =
delete;
951 constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
953 using __base_type::operator __integral_type;
954 using __base_type::operator=;
956#ifdef __cpp_lib_atomic_is_always_lock_free
957 static constexpr bool is_always_lock_free = ATOMIC_INT_LOCK_FREE == 2;
963 struct atomic<long> : __atomic_base<long>
965 typedef long __integral_type;
966 typedef __atomic_base<long> __base_type;
968 atomic()
noexcept =
default;
969 ~atomic()
noexcept =
default;
970 atomic(
const atomic&) =
delete;
971 atomic& operator=(
const atomic&) =
delete;
972 atomic& operator=(
const atomic&)
volatile =
delete;
974 constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
976 using __base_type::operator __integral_type;
977 using __base_type::operator=;
979#ifdef __cpp_lib_atomic_is_always_lock_free
980 static constexpr bool is_always_lock_free = ATOMIC_LONG_LOCK_FREE == 2;
986 struct atomic<unsigned long> : __atomic_base<unsigned long>
988 typedef unsigned long __integral_type;
989 typedef __atomic_base<unsigned long> __base_type;
991 atomic()
noexcept =
default;
992 ~atomic()
noexcept =
default;
993 atomic(
const atomic&) =
delete;
994 atomic& operator=(
const atomic&) =
delete;
995 atomic& operator=(
const atomic&)
volatile =
delete;
997 constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
999 using __base_type::operator __integral_type;
1000 using __base_type::operator=;
1002#ifdef __cpp_lib_atomic_is_always_lock_free
1003 static constexpr bool is_always_lock_free = ATOMIC_LONG_LOCK_FREE == 2;
1009 struct atomic<long long> : __atomic_base<long long>
1011 typedef long long __integral_type;
1012 typedef __atomic_base<long long> __base_type;
1014 atomic()
noexcept =
default;
1015 ~atomic()
noexcept =
default;
1016 atomic(
const atomic&) =
delete;
1017 atomic& operator=(
const atomic&) =
delete;
1018 atomic& operator=(
const atomic&)
volatile =
delete;
1020 constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
1022 using __base_type::operator __integral_type;
1023 using __base_type::operator=;
1025#ifdef __cpp_lib_atomic_is_always_lock_free
1026 static constexpr bool is_always_lock_free = ATOMIC_LLONG_LOCK_FREE == 2;
1032 struct atomic<unsigned long long> : __atomic_base<unsigned long long>
1034 typedef unsigned long long __integral_type;
1035 typedef __atomic_base<unsigned long long> __base_type;
1037 atomic()
noexcept =
default;
1038 ~atomic()
noexcept =
default;
1039 atomic(
const atomic&) =
delete;
1040 atomic& operator=(
const atomic&) =
delete;
1041 atomic& operator=(
const atomic&)
volatile =
delete;
1043 constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
1045 using __base_type::operator __integral_type;
1046 using __base_type::operator=;
1048#ifdef __cpp_lib_atomic_is_always_lock_free
1049 static constexpr bool is_always_lock_free = ATOMIC_LLONG_LOCK_FREE == 2;
1055 struct atomic<wchar_t> : __atomic_base<wchar_t>
1057 typedef wchar_t __integral_type;
1058 typedef __atomic_base<wchar_t> __base_type;
1060 atomic()
noexcept =
default;
1061 ~atomic()
noexcept =
default;
1062 atomic(
const atomic&) =
delete;
1063 atomic& operator=(
const atomic&) =
delete;
1064 atomic& operator=(
const atomic&)
volatile =
delete;
1066 constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
1068 using __base_type::operator __integral_type;
1069 using __base_type::operator=;
1071#ifdef __cpp_lib_atomic_is_always_lock_free
1072 static constexpr bool is_always_lock_free = ATOMIC_WCHAR_T_LOCK_FREE == 2;
1076#ifdef _GLIBCXX_USE_CHAR8_T
1079 struct atomic<char8_t> : __atomic_base<char8_t>
1081 typedef char8_t __integral_type;
1082 typedef __atomic_base<char8_t> __base_type;
1084 atomic() noexcept = default;
1085 ~
atomic() noexcept = default;
1090 constexpr
atomic(__integral_type __i) noexcept : __base_type(__i) { }
1092 using __base_type::operator __integral_type;
1093 using __base_type::operator=;
1095#ifdef __cpp_lib_atomic_is_always_lock_free
1096 static constexpr bool is_always_lock_free
1097 = ATOMIC_CHAR8_T_LOCK_FREE == 2;
1104 struct atomic<char16_t> : __atomic_base<char16_t>
1106 typedef char16_t __integral_type;
1107 typedef __atomic_base<char16_t> __base_type;
1109 atomic()
noexcept =
default;
1110 ~atomic()
noexcept =
default;
1111 atomic(
const atomic&) =
delete;
1112 atomic& operator=(
const atomic&) =
delete;
1113 atomic& operator=(
const atomic&)
volatile =
delete;
1115 constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
1117 using __base_type::operator __integral_type;
1118 using __base_type::operator=;
1120#ifdef __cpp_lib_atomic_is_always_lock_free
1121 static constexpr bool is_always_lock_free
1122 = ATOMIC_CHAR16_T_LOCK_FREE == 2;
1128 struct atomic<char32_t> : __atomic_base<char32_t>
1130 typedef char32_t __integral_type;
1131 typedef __atomic_base<char32_t> __base_type;
1133 atomic()
noexcept =
default;
1134 ~atomic()
noexcept =
default;
1135 atomic(
const atomic&) =
delete;
1136 atomic& operator=(
const atomic&) =
delete;
1137 atomic& operator=(
const atomic&)
volatile =
delete;
1139 constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { }
1141 using __base_type::operator __integral_type;
1142 using __base_type::operator=;
1144#ifdef __cpp_lib_atomic_is_always_lock_free
1145 static constexpr bool is_always_lock_free
1146 = ATOMIC_CHAR32_T_LOCK_FREE == 2;
1190#ifdef _GLIBCXX_USE_CHAR8_T
1201#ifdef _GLIBCXX_USE_C99_STDINT
1300 atomic_flag_test_and_set_explicit(
atomic_flag* __a,
1302 {
return __a->test_and_set(__m); }
1305 atomic_flag_test_and_set_explicit(
volatile atomic_flag* __a,
1307 {
return __a->test_and_set(__m); }
1309#if __cpp_lib_atomic_flag_test
1312 {
return __a->test(); }
1315 atomic_flag_test(
const volatile atomic_flag* __a)
noexcept
1316 {
return __a->test(); }
1321 {
return __a->test(__m); }
1324 atomic_flag_test_explicit(
const volatile atomic_flag* __a,
1326 {
return __a->test(__m); }
1331 { __a->clear(__m); }
1334 atomic_flag_clear_explicit(
volatile atomic_flag* __a,
1336 { __a->clear(__m); }
1339 atomic_flag_test_and_set(
atomic_flag* __a)
noexcept
1340 {
return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); }
1343 atomic_flag_test_and_set(
volatile atomic_flag* __a)
noexcept
1344 {
return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); }
1348 { atomic_flag_clear_explicit(__a, memory_order_seq_cst); }
1351 atomic_flag_clear(
volatile atomic_flag* __a)
noexcept
1352 { atomic_flag_clear_explicit(__a, memory_order_seq_cst); }
1354#if __cpp_lib_atomic_wait
1356 atomic_flag_wait(
atomic_flag* __a,
bool __old)
noexcept
1357 { __a->wait(__old); }
1360 atomic_flag_wait_explicit(
atomic_flag* __a,
bool __old,
1362 { __a->wait(__old, __m); }
1366 { __a->notify_one(); }
1370 { __a->notify_all(); }
1376 template<
typename _Tp>
1377 using __atomic_val_t = __type_identity_t<_Tp>;
1378 template<
typename _Tp>
1384 template<
typename _ITp>
1387 {
return __a->is_lock_free(); }
1389 template<
typename _ITp>
1391 atomic_is_lock_free(
const volatile atomic<_ITp>* __a)
noexcept
1392 {
return __a->is_lock_free(); }
1394 template<
typename _ITp>
1396 atomic_init(
atomic<_ITp>* __a, __atomic_val_t<_ITp> __i)
noexcept
1397 { __a->store(__i, memory_order_relaxed); }
1399 template<
typename _ITp>
1401 atomic_init(
volatile atomic<_ITp>* __a, __atomic_val_t<_ITp> __i)
noexcept
1402 { __a->store(__i, memory_order_relaxed); }
1404 template<
typename _ITp>
1406 atomic_store_explicit(
atomic<_ITp>* __a, __atomic_val_t<_ITp> __i,
1408 { __a->store(__i, __m); }
1410 template<
typename _ITp>
1412 atomic_store_explicit(
volatile atomic<_ITp>* __a, __atomic_val_t<_ITp> __i,
1414 { __a->store(__i, __m); }
1416 template<
typename _ITp>
1419 {
return __a->load(__m); }
1421 template<
typename _ITp>
1425 {
return __a->load(__m); }
1427 template<
typename _ITp>
1429 atomic_exchange_explicit(
atomic<_ITp>* __a, __atomic_val_t<_ITp> __i,
1431 {
return __a->exchange(__i, __m); }
1433 template<
typename _ITp>
1436 __atomic_val_t<_ITp> __i,
1438 {
return __a->exchange(__i, __m); }
1440 template<
typename _ITp>
1442 atomic_compare_exchange_weak_explicit(
atomic<_ITp>* __a,
1443 __atomic_val_t<_ITp>* __i1,
1444 __atomic_val_t<_ITp> __i2,
1447 {
return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); }
1449 template<
typename _ITp>
1451 atomic_compare_exchange_weak_explicit(
volatile atomic<_ITp>* __a,
1452 __atomic_val_t<_ITp>* __i1,
1453 __atomic_val_t<_ITp> __i2,
1456 {
return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); }
1458 template<
typename _ITp>
1460 atomic_compare_exchange_strong_explicit(
atomic<_ITp>* __a,
1461 __atomic_val_t<_ITp>* __i1,
1462 __atomic_val_t<_ITp> __i2,
1465 {
return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); }
1467 template<
typename _ITp>
1469 atomic_compare_exchange_strong_explicit(
volatile atomic<_ITp>* __a,
1470 __atomic_val_t<_ITp>* __i1,
1471 __atomic_val_t<_ITp> __i2,
1474 {
return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); }
1477 template<
typename _ITp>
1479 atomic_store(
atomic<_ITp>* __a, __atomic_val_t<_ITp> __i)
noexcept
1480 { atomic_store_explicit(__a, __i, memory_order_seq_cst); }
1482 template<
typename _ITp>
1484 atomic_store(
volatile atomic<_ITp>* __a, __atomic_val_t<_ITp> __i)
noexcept
1485 { atomic_store_explicit(__a, __i, memory_order_seq_cst); }
1487 template<
typename _ITp>
1490 {
return atomic_load_explicit(__a, memory_order_seq_cst); }
1492 template<
typename _ITp>
1495 {
return atomic_load_explicit(__a, memory_order_seq_cst); }
1497 template<
typename _ITp>
1499 atomic_exchange(
atomic<_ITp>* __a, __atomic_val_t<_ITp> __i)
noexcept
1500 {
return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); }
1502 template<
typename _ITp>
1505 __atomic_val_t<_ITp> __i)
noexcept
1506 {
return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); }
1508 template<
typename _ITp>
1511 __atomic_val_t<_ITp>* __i1,
1512 __atomic_val_t<_ITp> __i2)
noexcept
1514 return atomic_compare_exchange_weak_explicit(__a, __i1, __i2,
1515 memory_order_seq_cst,
1516 memory_order_seq_cst);
1519 template<
typename _ITp>
1521 atomic_compare_exchange_weak(
volatile atomic<_ITp>* __a,
1522 __atomic_val_t<_ITp>* __i1,
1523 __atomic_val_t<_ITp> __i2)
noexcept
1525 return atomic_compare_exchange_weak_explicit(__a, __i1, __i2,
1526 memory_order_seq_cst,
1527 memory_order_seq_cst);
1530 template<
typename _ITp>
1533 __atomic_val_t<_ITp>* __i1,
1534 __atomic_val_t<_ITp> __i2)
noexcept
1536 return atomic_compare_exchange_strong_explicit(__a, __i1, __i2,
1537 memory_order_seq_cst,
1538 memory_order_seq_cst);
1541 template<
typename _ITp>
1543 atomic_compare_exchange_strong(
volatile atomic<_ITp>* __a,
1544 __atomic_val_t<_ITp>* __i1,
1545 __atomic_val_t<_ITp> __i2)
noexcept
1547 return atomic_compare_exchange_strong_explicit(__a, __i1, __i2,
1548 memory_order_seq_cst,
1549 memory_order_seq_cst);
1553#if __cpp_lib_atomic_wait
1554 template<
typename _Tp>
1557 typename std::atomic<_Tp>::value_type __old)
noexcept
1558 { __a->wait(__old); }
1560 template<
typename _Tp>
1563 typename std::atomic<_Tp>::value_type __old,
1565 { __a->wait(__old, __m); }
1567 template<
typename _Tp>
1570 { __a->notify_one(); }
1572 template<
typename _Tp>
1575 { __a->notify_all(); }
1582 template<
typename _ITp>
1585 __atomic_diff_t<_ITp> __i,
1587 {
return __a->fetch_add(__i, __m); }
1589 template<
typename _ITp>
1592 __atomic_diff_t<_ITp> __i,
1594 {
return __a->fetch_add(__i, __m); }
1596 template<
typename _ITp>
1599 __atomic_diff_t<_ITp> __i,
1601 {
return __a->fetch_sub(__i, __m); }
1603 template<
typename _ITp>
1606 __atomic_diff_t<_ITp> __i,
1608 {
return __a->fetch_sub(__i, __m); }
1610 template<
typename _ITp>
1612 atomic_fetch_and_explicit(__atomic_base<_ITp>* __a,
1613 __atomic_val_t<_ITp> __i,
1615 {
return __a->fetch_and(__i, __m); }
1617 template<
typename _ITp>
1619 atomic_fetch_and_explicit(
volatile __atomic_base<_ITp>* __a,
1620 __atomic_val_t<_ITp> __i,
1622 {
return __a->fetch_and(__i, __m); }
1624 template<
typename _ITp>
1626 atomic_fetch_or_explicit(__atomic_base<_ITp>* __a,
1627 __atomic_val_t<_ITp> __i,
1629 {
return __a->fetch_or(__i, __m); }
1631 template<
typename _ITp>
1633 atomic_fetch_or_explicit(
volatile __atomic_base<_ITp>* __a,
1634 __atomic_val_t<_ITp> __i,
1636 {
return __a->fetch_or(__i, __m); }
1638 template<
typename _ITp>
1640 atomic_fetch_xor_explicit(__atomic_base<_ITp>* __a,
1641 __atomic_val_t<_ITp> __i,
1643 {
return __a->fetch_xor(__i, __m); }
1645 template<
typename _ITp>
1647 atomic_fetch_xor_explicit(
volatile __atomic_base<_ITp>* __a,
1648 __atomic_val_t<_ITp> __i,
1650 {
return __a->fetch_xor(__i, __m); }
1652#ifdef __cpp_lib_atomic_min_max
1653 template<
typename _Tp>
1656 __atomic_val_t<_Tp> __i,
1658 {
return __a->fetch_min(__i, __m); }
1660 template<
typename _Tp>
1662 atomic_fetch_min_explicit(
volatile atomic<_Tp>* __a,
1663 __atomic_val_t<_Tp> __i,
1665 {
return __a->fetch_min(__i, __m); }
1667 template<
typename _Tp>
1670 __atomic_val_t<_Tp> __i,
1672 {
return __a->fetch_max(__i, __m); }
1674 template<
typename _Tp>
1676 atomic_fetch_max_explicit(
volatile atomic<_Tp>* __a,
1677 __atomic_val_t<_Tp> __i,
1679 {
return __a->fetch_max(__i, __m); }
1682 template<
typename _ITp>
1685 __atomic_diff_t<_ITp> __i)
noexcept
1686 {
return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); }
1688 template<
typename _ITp>
1691 __atomic_diff_t<_ITp> __i)
noexcept
1692 {
return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); }
1694 template<
typename _ITp>
1697 __atomic_diff_t<_ITp> __i)
noexcept
1698 {
return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); }
1700 template<
typename _ITp>
1703 __atomic_diff_t<_ITp> __i)
noexcept
1704 {
return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); }
1706 template<
typename _ITp>
1708 atomic_fetch_and(__atomic_base<_ITp>* __a,
1709 __atomic_val_t<_ITp> __i)
noexcept
1710 {
return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); }
1712 template<
typename _ITp>
1714 atomic_fetch_and(
volatile __atomic_base<_ITp>* __a,
1715 __atomic_val_t<_ITp> __i)
noexcept
1716 {
return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); }
1718 template<
typename _ITp>
1720 atomic_fetch_or(__atomic_base<_ITp>* __a,
1721 __atomic_val_t<_ITp> __i)
noexcept
1722 {
return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); }
1724 template<
typename _ITp>
1726 atomic_fetch_or(
volatile __atomic_base<_ITp>* __a,
1727 __atomic_val_t<_ITp> __i)
noexcept
1728 {
return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); }
1730 template<
typename _ITp>
1732 atomic_fetch_xor(__atomic_base<_ITp>* __a,
1733 __atomic_val_t<_ITp> __i)
noexcept
1734 {
return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); }
1736 template<
typename _ITp>
1738 atomic_fetch_xor(
volatile __atomic_base<_ITp>* __a,
1739 __atomic_val_t<_ITp> __i)
noexcept
1740 {
return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); }
1742#ifdef __cpp_lib_atomic_min_max
1743 template<
typename _Tp>
1746 __atomic_val_t<_Tp> __i)
noexcept
1747 {
return atomic_fetch_min_explicit(__a, __i, memory_order_seq_cst); }
1749 template<
typename _Tp>
1752 __atomic_val_t<_Tp> __i)
noexcept
1753 {
return atomic_fetch_min_explicit(__a, __i, memory_order_seq_cst); }
1755 template<
typename _Tp>
1758 __atomic_val_t<_Tp> __i)
noexcept
1759 {
return atomic_fetch_max_explicit(__a, __i, memory_order_seq_cst); }
1761 template<
typename _Tp>
1764 __atomic_val_t<_Tp> __i)
noexcept
1765 {
return atomic_fetch_max_explicit(__a, __i, memory_order_seq_cst); }
1768#ifdef __cpp_lib_atomic_float
1770 struct atomic<float> : __atomic_float<float>
1772 atomic() noexcept = default;
1775 atomic(
float __fp) noexcept : __atomic_float<
float>(__fp)
1778 atomic& operator=(
const atomic&)
volatile =
delete;
1779 atomic& operator=(
const atomic&) =
delete;
1781 using __atomic_float<
float>::operator=;
1785 struct atomic<double> : __atomic_float<double>
1787 atomic() noexcept = default;
1790 atomic(
double __fp) noexcept : __atomic_float<
double>(__fp)
1793 atomic& operator=(
const atomic&)
volatile =
delete;
1794 atomic& operator=(
const atomic&) =
delete;
1796 using __atomic_float<
double>::operator=;
1800 struct atomic<long double> : __atomic_float<long double>
1802 atomic() noexcept = default;
1805 atomic(
long double __fp) noexcept : __atomic_float<
long double>(__fp)
1808 atomic& operator=(
const atomic&)
volatile =
delete;
1809 atomic& operator=(
const atomic&) =
delete;
1811 using __atomic_float<
long double>::operator=;
1814#ifdef __STDCPP_FLOAT16_T__
1816 struct atomic<_Float16> : __atomic_float<_Float16>
1818 atomic() noexcept = default;
1821 atomic(_Float16 __fp) noexcept : __atomic_float<_Float16>(__fp)
1824 atomic& operator=(
const atomic&)
volatile =
delete;
1825 atomic& operator=(
const atomic&) =
delete;
1827 using __atomic_float<_Float16>::operator=;
1831#ifdef __STDCPP_FLOAT32_T__
1833 struct atomic<_Float32> : __atomic_float<_Float32>
1835 atomic() noexcept = default;
1838 atomic(_Float32 __fp) noexcept : __atomic_float<_Float32>(__fp)
1841 atomic& operator=(
const atomic&)
volatile =
delete;
1842 atomic& operator=(
const atomic&) =
delete;
1844 using __atomic_float<_Float32>::operator=;
1848#ifdef __STDCPP_FLOAT64_T__
1850 struct atomic<_Float64> : __atomic_float<_Float64>
1852 atomic() noexcept = default;
1855 atomic(_Float64 __fp) noexcept : __atomic_float<_Float64>(__fp)
1858 atomic& operator=(
const atomic&)
volatile =
delete;
1859 atomic& operator=(
const atomic&) =
delete;
1861 using __atomic_float<_Float64>::operator=;
1865#ifdef __STDCPP_FLOAT128_T__
1867 struct atomic<_Float128> : __atomic_float<_Float128>
1869 atomic() noexcept = default;
1872 atomic(_Float128 __fp) noexcept : __atomic_float<_Float128>(__fp)
1875 atomic& operator=(
const atomic&)
volatile =
delete;
1876 atomic& operator=(
const atomic&) =
delete;
1878 using __atomic_float<_Float128>::operator=;
1882#ifdef __STDCPP_BFLOAT16_T__
1884 struct atomic<__gnu_cxx::__bfloat16_t> : __atomic_float<__gnu_cxx::__bfloat16_t>
1886 atomic() noexcept = default;
1889 atomic(__gnu_cxx::__bfloat16_t __fp) noexcept : __atomic_float<__gnu_cxx::__bfloat16_t>(__fp)
1892 atomic& operator=(
const atomic&)
volatile =
delete;
1893 atomic& operator=(
const atomic&) =
delete;
1895 using __atomic_float<__gnu_cxx::__bfloat16_t>::operator=;
1900#ifdef __cpp_lib_atomic_ref
1902 template<
typename _Tp>
1903 struct atomic_ref : __atomic_ref<_Tp>
1906 atomic_ref(_Tp& __t) noexcept
1909 __glibcxx_assert(((__UINTPTR_TYPE__)this->_M_ptr % this->required_alignment) == 0);
1915 atomic_ref(_Tp&&) =
delete;
1917 template<
typename _Up>
1918 requires is_convertible_v<_Up(*)[1], _Tp(*)[1]>
1919 atomic_ref(atomic_ref<_Up> __other) noexcept
1920 : __atomic_ref<_Tp>(__other._M_ptr)
1923 atomic_ref& operator=(
const atomic_ref&) =
delete;
1925 atomic_ref(
const atomic_ref&) =
default;
1927 using __atomic_ref<_Tp>::operator=;
1930 friend struct atomic_ref;
1934#ifdef __cpp_lib_atomic_lock_free_type_aliases
1935# ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
1936 using atomic_signed_lock_free
1938 using atomic_unsigned_lock_free
1940# elif ATOMIC_INT_LOCK_FREE == 2
1943# elif ATOMIC_LONG_LOCK_FREE == 2
1946# elif ATOMIC_CHAR_LOCK_FREE == 2
1950# error "libstdc++ bug: no lock-free atomics but they were emitted in <version>"
1956_GLIBCXX_END_NAMESPACE_VERSION
constexpr _Tp * addressof(_Tp &__r) noexcept
Returns the actual address of the object or function referenced by r, even in the presence of an over...
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
atomic< unsigned long > atomic_ulong
atomic_ulong
atomic< intmax_t > atomic_intmax_t
atomic_intmax_t
atomic< uintptr_t > atomic_uintptr_t
atomic_uintptr_t
atomic< signed char > atomic_schar
atomic_schar
atomic< int_least8_t > atomic_int_least8_t
atomic_int_least8_t
atomic< unsigned long long > atomic_ullong
atomic_ullong
atomic< uint_fast8_t > atomic_uint_fast8_t
atomic_uint_fast8_t
atomic< intptr_t > atomic_intptr_t
atomic_intptr_t
atomic< int16_t > atomic_int16_t
atomic_int16_t
atomic< size_t > atomic_size_t
atomic_size_t
atomic< long > atomic_long
atomic_long
atomic< uint_least8_t > atomic_uint_least8_t
atomic_uint_least8_t
atomic< short > atomic_short
atomic_short
atomic< uint_least16_t > atomic_uint_least16_t
atomic_uint_least16_t
atomic< uint16_t > atomic_uint16_t
atomic_uint16_t
atomic< uint64_t > atomic_uint64_t
atomic_uint64_t
atomic< int_least32_t > atomic_int_least32_t
atomic_int_least32_t
atomic< uint8_t > atomic_uint8_t
atomic_uint8_t
#define ATOMIC_BOOL_LOCK_FREE
atomic< wchar_t > atomic_wchar_t
atomic_wchar_t
atomic< unsigned int > atomic_uint
atomic_uint
atomic< uint_least32_t > atomic_uint_least32_t
atomic_uint_least32_t
atomic< uint_fast64_t > atomic_uint_fast64_t
atomic_uint_fast64_t
atomic< int_fast32_t > atomic_int_fast32_t
atomic_int_fast32_t
atomic< char > atomic_char
atomic_char
atomic< int > atomic_int
atomic_int
atomic< uint_least64_t > atomic_uint_least64_t
atomic_uint_least64_t
atomic< int64_t > atomic_int64_t
atomic_int64_t
atomic< uintmax_t > atomic_uintmax_t
atomic_uintmax_t
atomic< int_fast16_t > atomic_int_fast16_t
atomic_int_fast16_t
atomic< int32_t > atomic_int32_t
atomic_int32_t
atomic< uint_fast16_t > atomic_uint_fast16_t
atomic_uint_fast16_t
atomic< int8_t > atomic_int8_t
atomic_int8_t
atomic< long long > atomic_llong
atomic_llong
atomic< char16_t > atomic_char16_t
atomic_char16_t
atomic< int_fast64_t > atomic_int_fast64_t
atomic_int_fast64_t
atomic< ptrdiff_t > atomic_ptrdiff_t
atomic_ptrdiff_t
atomic< char32_t > atomic_char32_t
atomic_char32_t
atomic< int_least16_t > atomic_int_least16_t
atomic_int_least16_t
atomic< unsigned char > atomic_uchar
atomic_uchar
atomic< int_fast8_t > atomic_int_fast8_t
atomic_int_fast8_t
memory_order
Enumeration for memory_order.
atomic< unsigned short > atomic_ushort
atomic_ushort
atomic< int_least64_t > atomic_int_least64_t
atomic_int_least64_t
atomic< bool > atomic_bool
atomic_bool
atomic< uint_fast32_t > atomic_uint_fast32_t
atomic_uint_fast32_t
atomic< uint32_t > atomic_uint32_t
atomic_uint32_t
ISO C++ entities toplevel namespace is std.
Generic atomic type, primary class template.