From b6aa683d9c7140217e2c10017a09d9f32bd56978 Mon Sep 17 00:00:00 2001 From: sha512sum Date: Wed, 26 Jun 2024 08:08:19 +0000 Subject: [PATCH] Fix kSeq --- include/utempl/utils.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/utempl/utils.hpp b/include/utempl/utils.hpp index 1dc6c1e..4a45e92 100644 --- a/include/utempl/utils.hpp +++ b/include/utempl/utils.hpp @@ -26,20 +26,20 @@ inline constexpr Wrapper kWrapper; namespace impl { template -struct kSeq {}; +struct kSeq { + template + friend constexpr auto operator|(F&& f, const kSeq&) { + return [&](std::index_sequence){ + return std::forward(f)(kWrapper...); + }(std::make_index_sequence()); + }; +}; } // namespace impl template inline constexpr impl::kSeq kSeq; -template -constexpr auto operator|(F&& f, impl::kSeq) { - return [&](std::index_sequence){ - return std::forward(f)(kWrapper...); - }(std::make_index_sequence()); -}; - template