I know that the standard does not force std::vector to allocate contiguous memory blocks, but all implementations obey this nevertheless.
Suppo
The standard does require the memory of an std::vector to be
contiguous. On the other hand, if you write something like:
std::vector > v;
the global memory (all of the v[i][j]) will not be contiguous. The
usual way of creating 2D arrays is to use a single
std::vector v;
and calculate the indexes, exactly as you suggest doing with float.
(You can also create a second std::vector with the addresses
if you want. I've always just recalculated the indexes, however.)