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-threads
16 // void promise<R&>::set_value_at_thread_exit(R& r);
22 #include "make_test_thread.h"
23 #include "test_macros.h"
27 void func(std::promise
<int&> p
)
29 p
.set_value_at_thread_exit(i
);
37 std::future
<int&> f
= p
.get_future();
38 support::make_test_thread(func
, std::move(p
)).detach();