diff --git a/libcxx/test/std/atomics/atomics.types.generic/assign_to_atomic_ref_deleted.fail.cpp b/libcxx/test/std/atomics/atomics.types.generic/assign_to_atomic_ref_deleted.fail.cpp --- a/libcxx/test/std/atomics/atomics.types.generic/assign_to_atomic_ref_deleted.fail.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/assign_to_atomic_ref_deleted.fail.cpp @@ -13,7 +13,12 @@ // { // static constexpr bool is_always_lock_free; // static constexpr size_t required_alignment; - +// +// explicit atomic_ref(T& obj) noexcept; +// atomic_ref(const atomic_ref&) noexcept; +// T operator=(T desired) const noexcept; +// atomic_ref& operator=(const atomic_ref&) = delete; +// // bool is_lock_free() const noexcept; // void store(T desr, memory_order m = memory_order_seq_cst) const noexcept; // T load(memory_order m = memory_order_seq_cst) const noexcept; @@ -26,11 +31,6 @@ // memory_order m = memory_order_seq_cst) const noexcept; // bool compare_exchange_strong(T& expc, T desr, // memory_order m = memory_order_seq_cst) const noexcept; - -// explicit atomic_ref(T& obj) noexcept; -// atomic_ref(const atomic_ref&) noexcept; -// T operator=(T desired) const noexcept; -// atomic_ref& operator=(const atomic_ref&) = delete; // }; #include @@ -41,7 +41,8 @@ int val = 1; std::atomic_ref t0(val); std::atomic_ref t1(val); - t0 = t1; + t0 = + t1; // expected-error {{object of type 'std::atomic_ref' cannot be assigned because its copy assignment operator is implicitly deleted}} return 0; } diff --git a/libcxx/test/std/atomics/atomics.types.generic/trivially_copyable_ref.fail.cpp b/libcxx/test/std/atomics/atomics.types.generic/trivially_copyable_ref.fail.cpp --- a/libcxx/test/std/atomics/atomics.types.generic/trivially_copyable_ref.fail.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/trivially_copyable_ref.fail.cpp @@ -45,9 +45,10 @@ int i_; }; -template +template void test(T t) { - std::atomic_ref t0(t); + std::atomic_ref t0( + t); // expected-error@atomic:* {{static_assert failed due to requirement 'is_trivially_copyable::value' "std::atomic_ref<_Tp> requires that '_Tp' be a trivially copyable type"}} } int main(int, char**) {