Quote:Exactly my point. Then what's the point of making this function general? Why not pass a random access iterator in the first place?
The point is that writing the function to work with any random access iterator is easier and simpler than writing the function just for vector::iterator and vector::const_iterator.