In the C++0x Variadic Templates Proposal paper Link there is an example of a class which supports an arbitrary number of dimensions. I have copied it below:
template<typename T, unsigned PrimaryDimension, unsigned... Dimensions>
class array { /* implementation */ };
array<double, 3, 3> rotation matrix; // 3x3 rotation matrix
Sadly the implementation is not provided. As I am relatively new to variadic templates I would be interested to see an implementation of this container.
Thanks to anybody who can provide a simple implementation.