Suppose I have two vectors of the same length:
std::vector<int> v1, v2;
if I have to iterate over both of it, which approach should I use:
for(size_t i = 0; i < v1.size(); ++i) { //...}
or
for(auto i = v1.begin(), j=v2.begin(); i != v1.end(); ++i, ++j) {//...}
Do both of these approaches always equal when optimized by compiler?