diff --git a/include/rexy/mpmc_queue.hpp b/include/rexy/mpmc_queue.hpp index a7d3464..8df0c75 100644 --- a/include/rexy/mpmc_queue.hpp +++ b/include/rexy/mpmc_queue.hpp @@ -48,8 +48,14 @@ namespace rexy{ using const_reference = const value_type&; private: - #ifdef __cpp_lib_hardware_interference_size - static constexpr size_t cacheline_size = std::hardware_destructive_interference_size; + #if defined(__cpp_lib_hardware_interference_size) + //libc++ bug + // https://bugs.llvm.org/show_bug.cgi?id=41423 + #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 11000 + static constexpr size_t cacheline_size = std::hardware_destructive_interference_size; + #else + static constexpr size_t cacheline_size = 64; + #endif #else //Best guess static constexpr size_t cacheline_size = 64;