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 // shared_future<R> share() &&;
21 #include "test_macros.h"
28 std::future
<T
> f0
= p
.get_future();
29 static_assert( noexcept(f0
.share()), "");
30 std::shared_future
<T
> f
= f0
.share();
37 static_assert( noexcept(f0
.share()), "");
38 std::shared_future
<T
> f
= f0
.share();
45 std::future
<T
> f0
= p
.get_future();
46 static_assert( noexcept(f0
.share()), "");
47 std::shared_future
<T
> f
= f0
.share();
54 static_assert( noexcept(f0
.share()), "");
55 std::shared_future
<T
> f
= f0
.share();
62 std::future
<T
> f0
= p
.get_future();
63 static_assert( noexcept(f0
.share()), "");
64 std::shared_future
<T
> f
= f0
.share();
71 static_assert( noexcept(f0
.share()), "");
72 std::shared_future
<T
> f
= f0
.share();