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(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;
25         std::future<int> f = f0; // expected-error {{call to deleted constructor of 'std::future<int>'}}
26     }
27     {
28         std::future<int &> f0;
29         std::future<int &> f = f0; // expected-error {{call to deleted constructor of 'std::future<int &>'}}
30     }
31     {
32         std::future<void> f0;
33         std::future<void> f = f0; // expected-error {{call to deleted constructor of 'std::future<void>'}}
34     }
35 
36     return 0;
37 }
38