From 34ab2755780b4c135ff78eacef94a1ae3f61b034 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 18 Mar 2019 13:53:52 +1100 Subject: [PATCH] tuple/value: forward the arguments from map to the helper function --- tuple/value.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tuple/value.hpp b/tuple/value.hpp index 978cd981..1028a54c 100644 --- a/tuple/value.hpp +++ b/tuple/value.hpp @@ -46,7 +46,9 @@ namespace cruft::tuple::value { auto map (std::index_sequence, FuncT &&func, ArgT &&arg) { - return std::tuple (std::invoke (func, std::get (arg))...); + return std::tuple ( + std::invoke (func, std::get (arg))... + ); } }; @@ -62,7 +64,11 @@ namespace cruft::tuple::value { > auto map (FuncT &&func, ArgT &&arg) { - return detail::map (IndicesV{}, func, arg); + return detail::map ( + IndicesV{}, + std::forward (func), + std::forward (arg) + ); }