File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 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, "");
9191static_assert (LockFreeStatusInfo<short >::status_known, " " );
9292static_assert (LockFreeStatusInfo<int >::status_known, " " );
9393static_assert (LockFreeStatusInfo<long >::status_known, " " );
94- static_assert (LockFreeStatusInfo<long long >::status_known, " " );
9594static_assert (LockFreeStatusInfo<void *>::status_known, " " );
9695
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+
97100// Those should always be lock free: hardcode some expected values to make sure our tests are actually
98101// testing something meaningful.
99102static_assert (LockFreeStatusInfo<char >::value == LockFreeStatus::always, " " );
You can’t perform that action at this time.
0 commit comments