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-exceptions
10 // UNSUPPORTED: no-threads
17 // void promise<void>::set_value();
22 #include "test_macros.h"
29 std::future
<T
> f
= p
.get_future();
37 catch (const std::future_error
& e
)
39 assert(e
.code() == make_error_code(std::future_errc::promise_already_satisfied
));