Skip to content

Commit

Permalink
[libc++] Add missing check for C++17 in test
Browse files Browse the repository at this point in the history
This was never caught on our bots because this specific test is marked
as `XFAIL: !is-lockfree-runtime-function`, which is the case on our bots.
  • Loading branch information
ldionne committed Nov 22, 2023
1 parent 0401668 commit 07fdc08
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ struct TestFn {

A a(t);
bool b1 = std::atomic_is_lock_free(static_cast<const A*>(&a));
#if TEST_STD_VER >= 17
if (A::is_always_lock_free)
assert(b1);
#endif

volatile A va(t);
bool b2 = std::atomic_is_lock_free(static_cast<const volatile A*>(&va));
Expand Down

0 comments on commit 07fdc08

Please sign in to comment.