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<R&>::set_value(R& r);
21 #include "test_macros.h"
29 std::future
<T
> f
= p
.get_future();
35 #ifndef TEST_HAS_NO_EXCEPTIONS
41 catch (const std::future_error
& e
)
43 assert(e
.code() == make_error_code(std::future_errc::promise_already_satisfied
));