following situation: I work with data that falls into the categories of
std::vector<T> data1;
std::vector<std::vector<T>> data2;
std::vector<std::vector<std::vector<T>>> data3; //etc...
T usually refers to numerical data like double.
Sometimes I would like to get the data in a form where the last std::vector is replaced by a std::span<T> pointing to the same data.
std::span<T> data1;
std::vector<std::span<T>> data2;
std::vector<std::vector<std::span<T>>> data3; //etc...
It's not hard to define individual functions for every single level of nesting, but could I somehow also define a single function that could do this automatically for any level of nesting?