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 // XFAIL: libcpp-no-exceptions
11 // UNSUPPORTED: libcpp-has-no-threads
12 // UNSUPPORTED: c++98, c++03
18 // void set_exception(exception_ptr p);
28 std::future<T> f = p.get_future();
29 p.set_exception(std::make_exception_ptr(3));
41 p.set_exception(std::make_exception_ptr(3));
44 catch (const std::future_error& e)
46 assert(e.code() == make_error_code(std::future_errc::promise_already_satisfied));