Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-02-19 09:05:20


----- Original Message -----
From: "Vladimir Ciobanu" <psycho_at_[hidden]>

> ----- Original Message -----
> From: "dietmar_kuehl" <dietmar_kuehl_at_[hidden]>

> > Hi,
> > Vladimir Ciobanu <psycho_at_t...> wrote:
> > > I don't actually know what can be done to make const_iterator,
> > > const iterator, but it'd be quite a good idea. imho.
> >
> > As I have pointed out several times in the past, the problem about
> > iterators is that they are two concepts bundled into one: An iterator
> > is a position and a property access strategy combined into one
> > concept. This causes lots of porblems and the difference between
> > 'iterator' and 'const_iterator' is just one of them (restrictions on
> > the value type, eg. that it cannot be a proxy, and problems with
> > projections are others).
>
> Many people agree that STL's iterators are flawed. As an addition to
> what you mentioned, they don't represent orthogonal concepts. I won't go
any
> further since there are enough webpages which address this matter.

Maybe so, but as long as iterators /are/ doing double-duty it would be a
terrible loss if there were no way to represent the difference between a
const iterator and a const_iterator.

-Dave


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