Iterator class for vector and basic_string
Nathan Myers
ncm@cygnus.com
Sun Nov 1 11:57:00 GMT 1998
>
> >>>>> Chip Salzenberg <chip@perlsupport.com>:
>
> > According to Ryszard Kabatek:
> >> I wrote an iterator class for std::vector<> and std::basic_string<>.
>
> > Could someone please fill me in on why that's necessary? I thought
> > that plain old pointers were adequate iterators in these cases.
>
> const_iterators and reverse_iterators are two uses that comes to mind.
> Don't remember offhand if these are mandated for basic_string.
the const_iterator for string is, currently, char const*.
The reverse_iterator for string is reverse_iterator<char*>.
When we have a better iterator these will of course change too.
Nathan Myers
ncm@cantrip.org
More information about the Libstdc++
mailing list