Skip to content

Commit

Permalink
[libc++][test] atomic<T> requires trivially copyable T
Browse files Browse the repository at this point in the history
The author of these tests apparently forgot that `atomic_{,un}signed_lock_free` are already specializations of `atomic`.
  • Loading branch information
CaseyCarter committed Oct 20, 2020
1 parent fce9ca3 commit dccc742
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -136,8 +136,8 @@ void run()
static_assert(std::atomic<std::nullptr_t>::is_always_lock_free == (2 == ATOMIC_POINTER_LOCK_FREE), "");

#if TEST_STD_VER >= 20
static_assert(std::atomic<std::atomic_signed_lock_free>::is_always_lock_free, "");
static_assert(std::atomic<std::atomic_unsigned_lock_free>::is_always_lock_free, "");
static_assert(std::atomic_signed_lock_free::is_always_lock_free, "");
static_assert(std::atomic_unsigned_lock_free::is_always_lock_free, "");
#endif
}

Expand Down
4 changes: 2 additions & 2 deletions libcxx/test/std/atomics/types.pass.cpp
Expand Up @@ -169,8 +169,8 @@ int main(int, char**)
test<float>();

#if TEST_STD_VER >= 20
test<std::atomic_signed_lock_free>();
test<std::atomic_unsigned_lock_free>();
test<std::atomic_signed_lock_free::value_type>();
test<std::atomic_unsigned_lock_free::value_type>();
/*
test<std::shared_ptr<int>>();
*/
Expand Down

0 comments on commit dccc742

Please sign in to comment.