Android libstdc++ is really stupid, it seems.

This commit is contained in:
Bartosz Taudul 2021-12-21 19:56:32 +01:00
parent c4e08def0d
commit 81ae7c06b8
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -25,7 +25,6 @@ SOFTWARE.
#include <atomic>
#include <cassert>
#include <cstddef>
#include <new> // std::hardware_destructive_interference_size
#include <stdexcept>
#include <type_traits> // std::enable_if, std::is_*_constructible
@ -113,12 +112,7 @@ public:
size_t capacity() const noexcept { return capacity_ - 1; }
private:
#ifdef __cpp_lib_hardware_interference_size
static constexpr size_t kCacheLineSize =
std::hardware_destructive_interference_size;
#else
static constexpr size_t kCacheLineSize = 64;
#endif
// Padding to avoid false sharing between slots_ and adjacent allocations
static constexpr size_t kPadding = (kCacheLineSize - 1) / sizeof(T) + 1;