mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 03:17:15 +02:00
Stabilize ABI of cacheline_protected by hardcoding its alignment to 64
This commit is contained in:
@ -37,22 +37,7 @@ namespace detail{
|
|||||||
namespace foa{
|
namespace foa{
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct
|
struct alignas(64) cacheline_protected:T
|
||||||
|
|
||||||
#if defined(__cpp_lib_hardware_interference_size)
|
|
||||||
#if defined(BOOST_GCC)
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored "-Winterference-size"
|
|
||||||
#endif
|
|
||||||
alignas(std::hardware_destructive_interference_size)
|
|
||||||
#if defined(BOOST_GCC)
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
alignas(64)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cacheline_protected:T
|
|
||||||
{
|
{
|
||||||
using T::T;
|
using T::T;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user