File tree 1 file changed +4
-1
lines changed 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -91,9 +91,12 @@ static_assert(LockFreeStatusInfo<char>::status_known, "");
91
91
static_assert (LockFreeStatusInfo<short >::status_known, " " );
92
92
static_assert (LockFreeStatusInfo<int >::status_known, " " );
93
93
static_assert (LockFreeStatusInfo<long >::status_known, " " );
94
- static_assert (LockFreeStatusInfo<long long >::status_known, " " );
95
94
static_assert (LockFreeStatusInfo<void *>::status_known, " " );
96
95
96
+ // long long is a bit funky: on some platforms, its alignment is 4 bytes but its size is
97
+ // 8 bytes. In that case, atomics may or may not be lockfree based on their address.
98
+ static_assert (alignof(long long ) == sizeof(long long ) ? LockFreeStatusInfo<long long>::status_known : true, "");
99
+
97
100
// Those should always be lock free: hardcode some expected values to make sure our tests are actually
98
101
// testing something meaningful.
99
102
static_assert (LockFreeStatusInfo<char >::value == LockFreeStatus::always, " " );
You can’t perform that action at this time.
0 commit comments