Any idea about how to implement this function?
template <class ... Ts>
auto unzip(const list<tuple<Ts...>> & l)
{
...
}
This function would receive a list of tuples and would return a tuple of lists. The first list would contain the elements of get<0>(t)
, and so on.
I can traverse the items of a tuple and of course traverse the list. But I don't know how declare some such tuple<list<T1>, list<T2> ...>
Any clue or reference?