From 6b1eaee1f923f7ceb80c3996e65df4f5a76d9f1d Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Thu, 5 Sep 2024 17:50:37 -0400 Subject: [PATCH] Broadcast: Forward rvalue references instead of wrapping them in std::tie Signed-off-by: Joseph Schuchart --- ttg/ttg/device/task.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ttg/ttg/device/task.h b/ttg/ttg/device/task.h index 76e5b8e8f..f6ff05a1a 100644 --- a/ttg/ttg/device/task.h +++ b/ttg/ttg/device/task.h @@ -474,7 +474,11 @@ namespace ttg::device { template inline detail::send_t broadcastk(rangeT &&keylist) { - return detail::send_t{detail::broadcastk_coro(std::tie(keylist))}; + if constexpr (std::is_rvalue_reference_v) { + return detail::send_t{detail::broadcastk_coro(std::forward(keylist))}; + } else { + return detail::send_t{detail::broadcastk_coro(std::tie(keylist))}; + } }