Fixes a regression on arm32 targets.
libstdc++-v3/ChangeLog:
* testsuite/29_atomics/atomic_ref/wait_notify.cc: Guard
test logic with constexpr check for is_always_lock_free.
void
test (S va, S vb)
{
- S aa{ va };
- S bb{ vb };
- std::atomic_ref<S> a{ aa };
- a.wait(bb);
- std::thread t([&]
- {
- a.store(bb);
- a.notify_one();
- });
- a.wait(aa);
- t.join();
+ if constexpr (std::atomic_ref<S>::is_always_lock_free)
+ {
+ S aa{ va };
+ S bb{ vb };
+ std::atomic_ref<S> a{ aa };
+ a.wait(bb);
+ std::thread t([&]
+ {
+ a.store(bb);
+ a.notify_one();
+ });
+ a.wait(aa);
+ t.join();
+ }
}
int