From 6c55ebac77a8067ce453da46b92040b71cd028da Mon Sep 17 00:00:00 2001 From: GPUCode Date: Sun, 10 Dec 2023 13:19:00 +0200 Subject: [PATCH] ring_buffer: Use feature macro --- 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 e10a9f89d..b19a409d6 100644 --- a/src/common/ring_buffer.h +++ b/src/common/ring_buffer.h @@ -105,7 +105,7 @@ public: private: // It is important to separate the below atomics for performance reasons: // Having them on the same cache-line would result in false-sharing between them. -#if defined(_MSC_VER) && _MSC_VER >= 1911 +#ifdef __cpp_lib_hardware_interference_size static constexpr std::size_t padding_size = std::hardware_destructive_interference_size - sizeof(std::atomic_size_t); #else