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: libcpp-has-no-threads
10
11 // <future>
12
13 // class promise<R>
14
15 // promise& operator=(const promise& rhs) = delete;
16
17 #include <future>
18
19 #include "test_macros.h"
20
main(int,char **)21 int main(int, char**)
22 {
23 {
24 std::promise<int> p0, p;
25 p = p0; // expected-error {{overload resolution selected deleted operator '='}}
26 }
27 {
28 std::promise<int&> p0, p;
29 p = p0; // expected-error {{overload resolution selected deleted operator '='}}
30 }
31 {
32 std::promise<void> p0, p;
33 p = p0; // expected-error {{overload resolution selected deleted operator '='}}
34 }
35
36 return 0;
37 }
38