Given just a std::string iterator, is it possible to determine the start and end points of the string? Supposing that I don’t have access to the string object and so cannot call string.begin() and string.end(), and all I can do is increment or decrement the iterator and test the value.
Thanks,
Phil
The short answer is no. The long answer is, because iterators aren’t expected to know about the containers or ranges that are iterating over, they are only expected to
Furthermore certain types iterators may do more than just the above, but principally they are all required to have/perform the above in some form or another.