From f43eae60806a2eeba9544f40eaf0a2bfa78c0d31 Mon Sep 17 00:00:00 2001 From: sha512sum Date: Tue, 26 Mar 2024 08:29:51 +0000 Subject: [PATCH] Add Result to Transform --- include/utempl/utils.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/utempl/utils.hpp b/include/utempl/utils.hpp index a44d10f..cdad54b 100644 --- a/include/utempl/utils.hpp +++ b/include/utempl/utils.hpp @@ -162,10 +162,10 @@ template concept TupleLike = kForceEnableTuple> || (requires{Get<0>(MakeTuple(42));} && impl::IsSafeTuple>::value); -template -inline constexpr auto Transform(Tuple&& container, auto&& f) { +template +inline constexpr auto Transform(Tuple&& container, auto&& f, TypeList = {}) { return [&](std::index_sequence){ - return MakeTuple(f(Get(std::forward(container)))...); + return MakeTuple(f(Get(std::forward(container)))...); }(std::make_index_sequence>()); };