Suppose I have an iterator and I want to increment the iterator by, say, 5. Without adding 1 to the iterator and checking it != vec.end() at every step, is it possible for me to simply add 5 to it and then check if I've gone to far? Same goes for subtracting 5, is this possible?
std::distance works out the distance between 2 iterators - you query was about seeing whether adding or subtracting an arbitrary number would go out of bounds.
So compare the distance from your iterator to the end, is less than the arbitrary number.