How to declare high order vectors vector<vector<vector<.....<vector<double>>>>>...>
Hello,
I suspect that C++11 would make it possible to declare high rank vectors such as
Code:
int N = 15; // chosen arbitrary rank
vector<vector<vector<...<vector<double>>>>..> vec; // N layers of nested vectors
Is there a way to declare such a vector of rank N (given a fixed integer rank N)?
Heuristically I would like to write the declaration like this:
Code:
vector<double> A;
vector<A> vec[0];
for(int i=1; i<N; i++)
{
vector<vec[i-1]> vec[i];
}
Is there a way to use the new variadic templates to make this work?
Many thanks.