I have following std::vector
declaration:
std::vector
I am initializing
If you can assert that your vector dimensions are going to be of a fixed length, then why not use std::array
?
For example:
std:array
That way you can take advantage of all the memory being contiguously allocated (as hinted at by Viktor_Sehr in the comments), without the added implementation woes of accessing a 1-dimensional array in a 3-dimensional way.