How can I express that each parameter in the parameter package for the variation template is itself a parameter package?
Consider this code:
template <typename... TS>
void use_tuple(std::tuple<TS...> arg0);
template <typename... TS0, typename... TS1>
void use_tuple(std::tuple<TS0...> arg0, std::tuple<TS1...> arg1);
I want to use_tuplebe able to accept any number of tuples. Right now I have to write this as follows:
template <typename... TS0, typename... REST>
void use_tuple(std::tuple<TS0...> arg0, REST... rest);
void use_tuple();
But I want to write it like this:
template <(typename...)... PACK_OF_PACKS>
void use_tuple(std::tuple<PACK_OF_PACKS...>... args);
Is it possible? If so, how? If not, what else can I do? My goal for this code is to get the types contained in all tuples.
My ultimate goal is as follows:
template <typename...> void foo();
use_tuple(std::tuple<int, float, char>{},
std::tuple<double, short, std::string>{},
std::tuple<std::function<void()>, std::vector<int>>{});
But I want to implement this in a small, constant number of directions that are independent of the number of tuples passed in or the number of elements in each. Therefore there is no recursion.