241 typedef _ITp __int_type;
243 static constexpr int _S_alignment =
244 sizeof(_ITp) >
alignof(_ITp) ?
sizeof(_ITp) :
alignof(_ITp);
246 alignas(_S_alignment) __int_type _M_i;
258 operator __int_type()
const noexcept
261 operator __int_type()
const volatile noexcept
265 operator=(__int_type __i)
noexcept
272 operator=(__int_type __i)
volatile noexcept
279 operator++(
int)
noexcept
280 {
return fetch_add(1); }
283 operator++(
int)
volatile noexcept
284 {
return fetch_add(1); }
287 operator--(
int)
noexcept
288 {
return fetch_sub(1); }
291 operator--(
int)
volatile noexcept
292 {
return fetch_sub(1); }
295 operator++()
noexcept
299 operator++()
volatile noexcept
303 operator--()
noexcept
307 operator--()
volatile noexcept
311 operator+=(__int_type __i)
noexcept
315 operator+=(__int_type __i)
volatile noexcept
319 operator-=(__int_type __i)
noexcept
323 operator-=(__int_type __i)
volatile noexcept
327 operator&=(__int_type __i)
noexcept
331 operator&=(__int_type __i)
volatile noexcept
335 operator|=(__int_type __i)
noexcept
339 operator|=(__int_type __i)
volatile noexcept
343 operator^=(__int_type __i)
noexcept
347 operator^=(__int_type __i)
volatile noexcept
351 is_lock_free()
const noexcept
355 reinterpret_cast<void *
>(-
__alignof(_M_i)));
359 is_lock_free()
const volatile noexcept
363 reinterpret_cast<void *
>(-
__alignof(_M_i)));
366 _GLIBCXX_ALWAYS_INLINE
void
367 store(__int_type __i,
memory_order __m = memory_order_seq_cst)
noexcept
370 __glibcxx_assert(__b != memory_order_acquire);
371 __glibcxx_assert(__b != memory_order_acq_rel);
372 __glibcxx_assert(__b != memory_order_consume);
377 _GLIBCXX_ALWAYS_INLINE
void
378 store(__int_type __i,
379 memory_order __m = memory_order_seq_cst)
volatile noexcept
382 __glibcxx_assert(__b != memory_order_acquire);
383 __glibcxx_assert(__b != memory_order_acq_rel);
384 __glibcxx_assert(__b != memory_order_consume);
389 _GLIBCXX_ALWAYS_INLINE __int_type
390 load(
memory_order __m = memory_order_seq_cst)
const noexcept
393 __glibcxx_assert(__b != memory_order_release);
394 __glibcxx_assert(__b != memory_order_acq_rel);
399 _GLIBCXX_ALWAYS_INLINE __int_type
400 load(
memory_order __m = memory_order_seq_cst)
const volatile noexcept
403 __glibcxx_assert(__b != memory_order_release);
404 __glibcxx_assert(__b != memory_order_acq_rel);
409 _GLIBCXX_ALWAYS_INLINE __int_type
417 _GLIBCXX_ALWAYS_INLINE __int_type
419 memory_order __m = memory_order_seq_cst)
volatile noexcept
424 _GLIBCXX_ALWAYS_INLINE
bool
425 compare_exchange_weak(__int_type&
__i1, __int_type
__i2,
430 __glibcxx_assert(
__b2 != memory_order_release);
431 __glibcxx_assert(
__b2 != memory_order_acq_rel);
432 __glibcxx_assert(
__b2 <= __b1);
437 _GLIBCXX_ALWAYS_INLINE
bool
438 compare_exchange_weak(__int_type&
__i1, __int_type
__i2,
444 __glibcxx_assert(
__b2 != memory_order_release);
445 __glibcxx_assert(
__b2 != memory_order_acq_rel);
446 __glibcxx_assert(
__b2 <= __b1);
451 _GLIBCXX_ALWAYS_INLINE
bool
452 compare_exchange_weak(__int_type&
__i1, __int_type
__i2,
455 return compare_exchange_weak(
__i1,
__i2, __m,
456 __cmpexch_failure_order(__m));
459 _GLIBCXX_ALWAYS_INLINE
bool
460 compare_exchange_weak(__int_type&
__i1, __int_type
__i2,
461 memory_order __m = memory_order_seq_cst)
volatile noexcept
463 return compare_exchange_weak(
__i1,
__i2, __m,
464 __cmpexch_failure_order(__m));
467 _GLIBCXX_ALWAYS_INLINE
bool
468 compare_exchange_strong(__int_type&
__i1, __int_type
__i2,
473 __glibcxx_assert(
__b2 != memory_order_release);
474 __glibcxx_assert(
__b2 != memory_order_acq_rel);
475 __glibcxx_assert(
__b2 <= __b1);
480 _GLIBCXX_ALWAYS_INLINE
bool
481 compare_exchange_strong(__int_type&
__i1, __int_type
__i2,
488 __glibcxx_assert(
__b2 != memory_order_release);
489 __glibcxx_assert(
__b2 != memory_order_acq_rel);
490 __glibcxx_assert(
__b2 <= __b1);
495 _GLIBCXX_ALWAYS_INLINE
bool
496 compare_exchange_strong(__int_type&
__i1, __int_type
__i2,
499 return compare_exchange_strong(
__i1,
__i2, __m,
500 __cmpexch_failure_order(__m));
503 _GLIBCXX_ALWAYS_INLINE
bool
504 compare_exchange_strong(__int_type&
__i1, __int_type
__i2,
505 memory_order __m = memory_order_seq_cst)
volatile noexcept
507 return compare_exchange_strong(
__i1,
__i2, __m,
508 __cmpexch_failure_order(__m));
511 _GLIBCXX_ALWAYS_INLINE __int_type
512 fetch_add(__int_type __i,
516 _GLIBCXX_ALWAYS_INLINE __int_type
517 fetch_add(__int_type __i,
518 memory_order __m = memory_order_seq_cst)
volatile noexcept
521 _GLIBCXX_ALWAYS_INLINE __int_type
522 fetch_sub(__int_type __i,
526 _GLIBCXX_ALWAYS_INLINE __int_type
527 fetch_sub(__int_type __i,
528 memory_order __m = memory_order_seq_cst)
volatile noexcept
531 _GLIBCXX_ALWAYS_INLINE __int_type
536 _GLIBCXX_ALWAYS_INLINE __int_type
538 memory_order __m = memory_order_seq_cst)
volatile noexcept
541 _GLIBCXX_ALWAYS_INLINE __int_type
546 _GLIBCXX_ALWAYS_INLINE __int_type
548 memory_order __m = memory_order_seq_cst)
volatile noexcept
551 _GLIBCXX_ALWAYS_INLINE __int_type
556 _GLIBCXX_ALWAYS_INLINE __int_type
558 memory_order __m = memory_order_seq_cst)
volatile noexcept
568 typedef _PTp* __pointer_type;
574 _M_type_size(ptrdiff_t __d)
const {
return __d *
sizeof(
_PTp); }
577 _M_type_size(ptrdiff_t __d)
const volatile {
return __d *
sizeof(
_PTp); }
589 operator __pointer_type()
const noexcept
592 operator __pointer_type()
const volatile noexcept
596 operator=(__pointer_type __p)
noexcept
603 operator=(__pointer_type __p)
volatile noexcept
610 operator++(
int)
noexcept
611 {
return fetch_add(1); }
614 operator++(
int)
volatile noexcept
615 {
return fetch_add(1); }
618 operator--(
int)
noexcept
619 {
return fetch_sub(1); }
622 operator--(
int)
volatile noexcept
623 {
return fetch_sub(1); }
626 operator++()
noexcept
628 memory_order_seq_cst); }
631 operator++()
volatile noexcept
633 memory_order_seq_cst); }
636 operator--()
noexcept
638 memory_order_seq_cst); }
641 operator--()
volatile noexcept
643 memory_order_seq_cst); }
646 operator+=(ptrdiff_t __d)
noexcept
648 memory_order_seq_cst); }
651 operator+=(ptrdiff_t __d)
volatile noexcept
653 memory_order_seq_cst); }
656 operator-=(ptrdiff_t __d)
noexcept
658 memory_order_seq_cst); }
661 operator-=(ptrdiff_t __d)
volatile noexcept
663 memory_order_seq_cst); }
666 is_lock_free()
const noexcept
670 reinterpret_cast<void *
>(-
__alignof(_M_p)));
674 is_lock_free()
const volatile noexcept
678 reinterpret_cast<void *
>(-
__alignof(_M_p)));
681 _GLIBCXX_ALWAYS_INLINE
void
682 store(__pointer_type __p,
687 __glibcxx_assert(__b != memory_order_acquire);
688 __glibcxx_assert(__b != memory_order_acq_rel);
689 __glibcxx_assert(__b != memory_order_consume);
694 _GLIBCXX_ALWAYS_INLINE
void
695 store(__pointer_type __p,
696 memory_order __m = memory_order_seq_cst)
volatile noexcept
699 __glibcxx_assert(__b != memory_order_acquire);
700 __glibcxx_assert(__b != memory_order_acq_rel);
701 __glibcxx_assert(__b != memory_order_consume);
706 _GLIBCXX_ALWAYS_INLINE __pointer_type
707 load(
memory_order __m = memory_order_seq_cst)
const noexcept
710 __glibcxx_assert(__b != memory_order_release);
711 __glibcxx_assert(__b != memory_order_acq_rel);
716 _GLIBCXX_ALWAYS_INLINE __pointer_type
717 load(
memory_order __m = memory_order_seq_cst)
const volatile noexcept
720 __glibcxx_assert(__b != memory_order_release);
721 __glibcxx_assert(__b != memory_order_acq_rel);
726 _GLIBCXX_ALWAYS_INLINE __pointer_type
734 _GLIBCXX_ALWAYS_INLINE __pointer_type
736 memory_order __m = memory_order_seq_cst)
volatile noexcept
741 _GLIBCXX_ALWAYS_INLINE
bool
742 compare_exchange_strong(__pointer_type&
__p1, __pointer_type
__p2,
748 __glibcxx_assert(
__b2 != memory_order_release);
749 __glibcxx_assert(
__b2 != memory_order_acq_rel);
750 __glibcxx_assert(
__b2 <= __b1);
755 _GLIBCXX_ALWAYS_INLINE
bool
756 compare_exchange_strong(__pointer_type&
__p1, __pointer_type
__p2,
763 __glibcxx_assert(
__b2 != memory_order_release);
764 __glibcxx_assert(
__b2 != memory_order_acq_rel);
765 __glibcxx_assert(
__b2 <= __b1);
770 _GLIBCXX_ALWAYS_INLINE __pointer_type
771 fetch_add(ptrdiff_t __d,
775 _GLIBCXX_ALWAYS_INLINE __pointer_type
776 fetch_add(ptrdiff_t __d,
777 memory_order __m = memory_order_seq_cst)
volatile noexcept
780 _GLIBCXX_ALWAYS_INLINE __pointer_type
781 fetch_sub(ptrdiff_t __d,
785 _GLIBCXX_ALWAYS_INLINE __pointer_type
786 fetch_sub(ptrdiff_t __d,
787 memory_order __m = memory_order_seq_cst)
volatile noexcept