fix build error with libc++ v8-v10

This commit is contained in:
rexy712 2020-09-24 05:11:20 -07:00
parent b22c525407
commit 4c81c2b8b8

View File

@ -48,8 +48,14 @@ namespace rexy{
using const_reference = const value_type&; using const_reference = const value_type&;
private: private:
#ifdef __cpp_lib_hardware_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; static constexpr size_t cacheline_size = std::hardware_destructive_interference_size;
#else
static constexpr size_t cacheline_size = 64;
#endif
#else #else
//Best guess //Best guess
static constexpr size_t cacheline_size = 64; static constexpr size_t cacheline_size = 64;