Skip to content

Commit

Permalink
include/oneapi/dpl/internal/async_impl/async_impl_hetero.h - __make_f…
Browse files Browse the repository at this point in the history
…uture improvements : make code more compact

Signed-off-by: Sergey Kopienko <[email protected]>
  • Loading branch information
SergeyKopienko committed Sep 19, 2024
1 parent 362f0d8 commit 370f0d4
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -781,10 +781,9 @@ class __future : private std::tuple<_Args...>
static __future<_OtherEvent, _AddArgs..., _OtherArgs...>
__make_future(__future<_OtherEvent, _OtherArgs...>&& __f, _AddArgs... __add_args)
{
auto new_vals = std::tuple<_AddArgs...>(std::forward<_AddArgs>(__add_args)...);
auto new_tuple = std::tuple_cat(std::move(new_vals), static_cast<std::tuple<_OtherArgs...>&&>(__f));

return {std::move(__f.__my_event), std::move(new_tuple)};
return {std::move(__f.__my_event),
std::tuple_cat(std::tuple<_AddArgs...>(std::forward<_AddArgs>(__add_args)...),
static_cast<std::tuple<_OtherArgs...>&&>(__f))};
}
};

Expand Down

0 comments on commit 370f0d4

Please sign in to comment.