1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// UNSUPPORTED: c++03, c++11, c++14, c++17
10
11// atomic(const atomic&) = delete;
12// atomic& operator=(const atomic&) = delete;
13// atomic& operator=(const atomic&) volatile = delete;
14
15#include <atomic>
16#include <type_traits>
17
18template <class T>
19void test() {
20 static_assert(!std::is_copy_assignable_v<std::atomic<T>>);
21 static_assert(!std::is_copy_constructible_v<std::atomic<T>>);
22 static_assert(!std::is_move_constructible_v<std::atomic<T>>);
23 static_assert(!std::is_move_assignable_v<std::atomic<T>>);
24 static_assert(!std::is_assignable_v<volatile std::atomic<T>&, const std::atomic<T>&>);
25}
26
27template void test<float>();
28template void test<double>();
29template void test<long double>();
30

source code of libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/copy.compile.pass.cpp