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
16 // void set_exception(exception_ptr p);
26 std::future<T> f = p.get_future();
27 p.set_exception(std::make_exception_ptr(3));
39 p.set_exception(std::make_exception_ptr(3));
42 catch (const std::future_error& e)
44 assert(e.code() == make_error_code(std::future_errc::promise_already_satisfied));