brintos

brintos / llvm-project-archived public Read only

0
0
Text · 787 B · 5250ae7 Raw
30 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8//9// UNSUPPORTED: no-threads10// UNSUPPORTED: c++0311 12// <future>13 14// class packaged_task<R(ArgTypes...)>15 16// packaged_task(packaged_task&) = delete;17 18#include <future>19 20 21int main(int, char**)22{23    {24        std::packaged_task<double(int, char)> p0;25        std::packaged_task<double(int, char)> p(p0); // expected-error {{call to deleted constructor of 'std::packaged_task<double (int, char)>'}}26    }27 28  return 0;29}30