brintos

brintos / llvm-project-archived public Read only

0
0
Text · 911 B · cb7e855 Raw
33 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 11// <future>12 13// class future<R>14 15// future& operator=(const future&) = delete;16 17#include <future>18 19void f() {20    {21        std::future<int> f0, f;22        f = f0; // expected-error {{overload resolution selected deleted operator '='}}23    }24    {25        std::future<int &> f0, f;26        f = f0; // expected-error {{overload resolution selected deleted operator '='}}27    }28    {29        std::future<void> f0, f;30        f = f0; // expected-error {{overload resolution selected deleted operator '='}}31    }32}33