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 | // <atomic> |
10 | |
11 | // std::atomic |
12 | |
13 | // atomic& operator=( const atomic& ) volatile = delete; |
14 | |
15 | #include <atomic> |
16 | |
17 | void f() { |
18 | volatile std::atomic<int> obj1; |
19 | std::atomic<int> obj2; |
20 | obj1 = obj2; // expected-error {{overload resolution selected deleted operator '='}} |
21 | } |
22 | |