
16 Mar
2006
16 Mar
'06
10:25 a.m.
On 3/16/06, AlisdairM <alisdair.meredith@uk.renaultf1.com> wrote:
const char * is not a random access iterator because it is not an output iterator, therfore not a forward iterator, therefore not a bidirectional iterator and therefore not a random access iterator - 24.1
I think that is wrong. Forward iterators are not output iterators. See http://www.sgi.com/tech/stl/ForwardIterator.html The only expressions a forward iterator has to support are x++ and ++x. Also, http://www.sgi.com/tech/stl/RandomAccessIterator.html specifically says the iterator has to support assignment only if its type is mutable. For example, vector<T>::const_iterator is a random access iterator.