I've written a class vecMatrix
that wraps around std::vector
to provide two-dimensional storage functionalities. However, while it's incredibly convenient to be able to write loops that sweep the data in an std::vector
object as
std::vector<float> vec;
for (auto& val: vec) { /* do stuff to val*/}
I can't do it with my custom class. What kind of operator overload is required to be able to code the same way for vecMatrix
?:
vecMatrix<float> mat;
for (auto& val: mat) { /* do stuff to val*/}