ring_buffer: Use feature macro

This commit is contained in:
GPUCode
2023-12-10 13:19:00 +02:00
parent 5c2a0c4e37
commit 6c55ebac77

View File

@ -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