ring_buffer: Use feature macro
This commit is contained in:
@ -105,7 +105,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
// It is important to separate the below atomics for performance reasons:
|
// 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.
|
// 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 =
|
static constexpr std::size_t padding_size =
|
||||||
std::hardware_destructive_interference_size - sizeof(std::atomic_size_t);
|
std::hardware_destructive_interference_size - sizeof(std::atomic_size_t);
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user