From 777424069cb3d7daf8c5f022f1ac53ace333a41a Mon Sep 17 00:00:00 2001 From: sha512sum Date: Wed, 27 Mar 2024 14:33:12 +0000 Subject: [PATCH] Add operator << to add for TupleLike --- include/utempl/utils.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/utempl/utils.hpp b/include/utempl/utils.hpp index 91bdd03..07c0976 100644 --- a/include/utempl/utils.hpp +++ b/include/utempl/utils.hpp @@ -555,4 +555,11 @@ consteval auto Take() { }; }; +template +inline constexpr auto operator<<(Tuple&& tuple, T&& t) { + return Unpack(std::forward(tuple), [&](Ts&&... args){ + return MakeTuple(std::forward(args)..., std::forward(t)); + }); +}; + } // namespace utempl