From ab6dfa4fa55266082171f9752abae00bea8db555 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 18 Sep 2018 23:06:24 -0400 Subject: [PATCH] ring_buffer: Use std::atomic_size_t in a static assert Avoids the need to repeat "std::" twice --- src/common/ring_buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/ring_buffer.h b/src/common/ring_buffer.h index 0fd5b86f0..abe3b4dc2 100644 --- a/src/common/ring_buffer.h +++ b/src/common/ring_buffer.h @@ -30,7 +30,7 @@ class RingBuffer { static_assert(capacity < std::numeric_limits::max() / 2 / granularity); static_assert((capacity & (capacity - 1)) == 0, "capacity must be a power of two"); // Ensure lock-free. - static_assert(std::atomic::is_always_lock_free); + static_assert(std::atomic_size_t::is_always_lock_free); public: /// Pushes slots into the ring buffer