This page states that string::iterator
and string::const_iterator
are "compiler specific iterator types." Does this mean that that string::iterator
made be in a category other than random_access_iterator
?
ISO C++03, 21.3-2
states:
(...)Additionally, because the iterators supported by basic_string are random access iterators(...)
So yes, those are necessarily random access iterators.
Looking at N3376 21.4/3
The iterators supported by basic_string are random-access iterators.
For such tasks its always a good idea to have a standard (or draft) at hand. It takes a while to get used to looking up things there, but it is the first hand resource.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With