[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / thread / futures / futures.promise / default.pass.cpp
blob80a5f0a61df3ee01a1ab29d94693bc19a484e6c2
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
12 // <future>
14 // class promise<R>
16 // promise();
18 #include <future>
19 #include <cassert>
21 #include "test_macros.h"
23 int main(int, char**)
26 std::promise<int> p;
27 std::future<int> f = p.get_future();
28 assert(f.valid());
31 std::promise<int&> p;
32 std::future<int&> f = p.get_future();
33 assert(f.valid());
36 std::promise<void> p;
37 std::future<void> f = p.get_future();
38 assert(f.valid());
41 return 0;