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