@@ -125,7 +125,7 @@ constexpr T nil() noexcept {
125125}
126126
127127template <class T >
128- ATOMIC_QUEUE_INLINE static void destroy_n (T* ATOMIC_QUEUE_RESTRICT p, unsigned n) noexcept {
128+ ATOMIC_QUEUE_INLINE static void destroy_n (T* p, unsigned n) noexcept {
129129 for (auto q = p + n; p != q;)
130130 (p++)->~T ();
131131}
@@ -387,7 +387,7 @@ class AtomicQueue : public AtomicQueueCommon<AtomicQueue<T, SIZE, NIL, MINIMIZE_
387387
388388 AtomicQueue () noexcept {
389389 assert (std::atomic<T>{NIL}.is_lock_free ()); // Queue element type T is not atomic. Use AtomicQueue2/AtomicQueueB2 for such element types.
390- for (auto * ATOMIC_QUEUE_RESTRICT p = elements_, q = elements_ + size_; p != q; ++p)
390+ for (auto p = elements_, q = elements_ + size_; p != q; ++p)
391391 p->store (NIL, X);
392392 }
393393
@@ -453,7 +453,7 @@ class AtomicQueueB : private std::allocator_traits<A>::template rebind_alloc<std
453453 // AtomicQueueCommon members are stored into by readers and writers.
454454 // Allocate these immutable members on another cache line which never gets invalidated by stores.
455455 alignas (CACHE_LINE_SIZE) unsigned size_;
456- std::atomic<T>* ATOMIC_QUEUE_RESTRICT elements_;
456+ std::atomic<T>* elements_;
457457
458458 ATOMIC_QUEUE_INLINE T do_pop (unsigned tail) noexcept {
459459 std::atomic<T>& q_element = details::map<SHUFFLE_BITS>(elements_, tail & (size_ - 1 ));
@@ -534,8 +534,8 @@ class AtomicQueueB2 : private std::allocator_traits<A>::template rebind_alloc<un
534534 // AtomicQueueCommon members are stored into by readers and writers.
535535 // Allocate these immutable members on another cache line which never gets invalidated by stores.
536536 alignas (CACHE_LINE_SIZE) unsigned size_;
537- AtomicState* ATOMIC_QUEUE_RESTRICT states_;
538- T* ATOMIC_QUEUE_RESTRICT elements_;
537+ AtomicState* states_;
538+ T* elements_;
539539
540540 static constexpr auto STATES_PER_CACHE_LINE = CACHE_LINE_SIZE / sizeof (AtomicState);
541541 static_assert (STATES_PER_CACHE_LINE, " Unexpected STATES_PER_CACHE_LINE." );
@@ -580,7 +580,7 @@ class AtomicQueueB2 : private std::allocator_traits<A>::template rebind_alloc<un
580580 std::uninitialized_fill_n (states_, size_, Base::EMPTY);
581581 A a = get_allocator ();
582582 assert (a == allocator); // The standard requires the original and rebound allocators to manage the same state.
583- for (auto * ATOMIC_QUEUE_RESTRICT p = elements_, q = elements_ + size_; p < q; ++p)
583+ for (auto p = elements_, q = elements_ + size_; p < q; ++p)
584584 std::allocator_traits<A>::construct (a, p);
585585 }
586586
@@ -600,7 +600,7 @@ class AtomicQueueB2 : private std::allocator_traits<A>::template rebind_alloc<un
600600 ~AtomicQueueB2 () noexcept {
601601 if (elements_) {
602602 A a = get_allocator ();
603- for (auto * ATOMIC_QUEUE_RESTRICT p = elements_, q = elements_ + size_; p < q; ++p)
603+ for (auto p = elements_, q = elements_ + size_; p < q; ++p)
604604 std::allocator_traits<A>::destroy (a, p);
605605 deallocate_ (elements_);
606606 details::destroy_n (states_, size_);
0 commit comments