1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // UNSUPPORTED: libcpp-has-no-threads
11 // UNSUPPORTED: c++98, c++03
17 // void promise::set_value(const R& r);
22 #include "test_macros.h"
38 std::future<T> f = p.get_future();
42 #ifndef TEST_HAS_NO_EXCEPTIONS
49 catch (const std::future_error& e)
51 assert(e.code() == make_error_code(std::future_errc::promise_already_satisfied));
59 std::future<T> f = p.get_future();
60 #ifndef TEST_HAS_NO_EXCEPTIONS