Add operator << to add for TupleLike

This commit is contained in:
sha512sum 2024-03-27 14:33:12 +00:00
parent 16af4a548f
commit 777424069c

View file

@ -555,4 +555,11 @@ consteval auto Take() {
};
};
template <TupleLike Tuple, typename T>
inline constexpr auto operator<<(Tuple&& tuple, T&& t) {
return Unpack(std::forward<Tuple>(tuple), [&]<typename... Ts>(Ts&&... args){
return MakeTuple<Tuple>(std::forward<Ts>(args)..., std::forward<T>(t));
});
};
} // namespace utempl