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// UNSUPPORTED: c++03
11
12// <future>
13
14// class packaged_task<R(ArgTypes...)>
15
16// packaged_task& operator=(packaged_task&) = delete;
17
18#include <future>
19
20int main(int, char**)
21{
22 {
23 std::packaged_task<double(int, char)> p0, p;
24 p = p0; // expected-error {{overload resolution selected deleted operator '='}}
25 }
26
27 return 0;
28}
29

source code of libcxx/test/std/thread/futures/futures.task/futures.task.members/assign_copy.verify.cpp