10template <
typename V,
typename T>
12 static_assert(std::is_move_constructible_v<wrap_void_t<V>>);
16 if (
f.GetCore()->SetCallback(*
p.GetCore().Get())) {
17 f.GetCore().Release();
18 p.GetCore().Release();
20 std::move(
p).Set(std::move(
f).Touch());
24template <
typename V,
typename T>
28 if (
f.GetCore()->SetCallback(*
p.GetCore().Get())) {
29 p.GetCore().Release();
31 std::move(
p).Set(
f.Touch());
35template <
typename V,
typename T>
39 if (
f.GetCore()->SetCallback(*
p.GetCore().Get())) {
40 f.GetCore().Release();
41 p.GetCore().Release();
43 std::move(
p).Set(std::move(
f).Touch());
47template <
typename V,
typename T>
52 if (
f.GetCore()->SetCallback(*
p.GetCore().Get())) {
53 p.GetCore().Release();
55 std::move(
p).Set(
f.Touch());
59template <
typename V,
typename T>
67template <
typename V,
typename T>
Provides a mechanism to access the result of async operations.
#define YACLIB_ASSERT(cond)
Contract< V, T > MakeContract()
Creates related future and promise.
void Connect(FutureBase< V, T > &&f, Promise< V, T > &&p)