In c++ STL, if I have an iterator it into a vector v, is it - v.begin() guaranteed to give me the index into the vector, so that *it == v[it - v.begin()]? If so, is this true for all random access iterators?
In c++ STL, if I have an iterator it into a vector v ,
Share
Yes, it is, and it is true for all RA iterators.