Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / thread / futures / futures.promise / copy_assign.verify.cpp
blob84fa1c439cf69802e8126f4ba86fbffe36c4987a
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: no-threads
11 // <future>
13 // class promise<R>
15 // promise& operator=(const promise& rhs) = delete;
17 #include <future>
19 void f() {
21 std::promise<int> p0, p;
22 p = p0; // expected-error {{overload resolution selected deleted operator '='}}
25 std::promise<int&> p0, p;
26 p = p0; // expected-error {{overload resolution selected deleted operator '='}}
29 std::promise<void> p0, p;
30 p = p0; // expected-error {{overload resolution selected deleted operator '='}}