Boost logo

Boost :

From: Sean Huang (huangsean_at_[hidden])
Date: 2006-03-16 02:03:01


----- Original Message -----
From: "AlisdairM" <alisdair.meredith_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, March 15, 2006 2:06 PM
Subject: Re: [boost] distance operation (24.3.4)

>> This is specially evident when IteratorT is [const] char *, which is a
>> valid random access iterator.
>
> Why do you think const char * is a valid random access iterator?
>
> It is merely an input iterator, and one of the many motivations for
> improved iterator categories.
>
> (Basically, no const-iterator can ever be more than an input iterator,
> as bidirectional iterator refines both input *and* output iterator. All
> the more advanced iterators are refinements of bidirectional.)
>
Maybe I misunderstood you. Could you care to explain why const char * is NOT
a valid random access iterator. 24.3.1.2 clearly states otherwise.

Thanks,

Sean


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