// prints every element of a tuple template<size_t I = 0, typename... Tp> void print(std::tuple<Tp...>& t) { std::cout << std::get<I>(t) << " "; // do things if constexpr(I+1 != sizeof...(Tp)) print<I+1>(t); }