diff --git a/src/common/atomic_threadsafe_queue.h b/src/common/atomic_threadsafe_queue.h index dbca03f3de..0c4a792968 100644 --- a/src/common/atomic_threadsafe_queue.h +++ b/src/common/atomic_threadsafe_queue.h @@ -21,26 +21,19 @@ SOFTWARE. */ #pragma once +#pragma warning(push) +#pragma warning(disable : 4324) #include #include #include // offsetof #include -#include // std::hardware_destructive_interference_size +#include #include namespace Common { namespace mpmc { -#ifdef __cpp_lib_hardware_interference_size -static constexpr size_t hardwareInterferenceSize = std::hardware_destructive_interference_size; -#else static constexpr size_t hardwareInterferenceSize = 64; -#endif - -#if defined(_MSC_VER) -// Disables "structure was padded due to alignment specifier" warnings. -#pragma warning(suppress : 4324) -#endif template using AlignedAllocator = std::allocator; @@ -238,4 +231,8 @@ private: template >> using MPMCQueue = mpmc::Queue; -} // namespace Common \ No newline at end of file +} // namespace Common + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif \ No newline at end of file