Boost logo

Boost :

From: David Benbennick (dbenbenn_at_[hidden])
Date: 2006-03-16 05:25:03


On 3/16/06, AlisdairM <alisdair.meredith_at_[hidden]> 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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk