1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: no-threads
16 // void promise::set_value(const R& r);
21 #include "test_macros.h"
37 std::future
<T
> f
= p
.get_future();
41 #ifndef TEST_HAS_NO_EXCEPTIONS
48 catch (const std::future_error
& e
)
50 assert(e
.code() == make_error_code(std::future_errc::promise_already_satisfied
));
58 std::future
<T
> f
= p
.get_future();
59 #ifndef TEST_HAS_NO_EXCEPTIONS