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::set_exception_at_thread_exit(exception_ptr p);
22 #include "make_test_thread.h"
23 #include "test_macros.h"
25 void func(std::promise
<int> p
)
27 p
.set_exception_at_thread_exit(std::make_exception_ptr(3));
35 std::future
<T
> f
= p
.get_future();
36 support::make_test_thread(func
, std::move(p
)).detach();