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