From: Vladimir Ciobanu (psycho_at_[hidden])
Date: 2002-02-19 07:18:10
----- Original Message -----
From: "dietmar_kuehl" <dietmar_kuehl_at_[hidden]>
Sent: Tuesday, February 19, 2002 1:56 PM
Subject: [boost] Re: Most needed/desired features in C++
> 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.
> If we are to address this issue, it is a clean-up of the whole STL
I really hope the next standard will bring us a cleaner, better STL.
However, I have my doubts assuming they want to keep old code valid. :/
> Other than this, I think that STL usage would become easier if
> sequences could optionally be specified as something which looks
> like a 'std::pair<>' of iterators (ie. has member 'first' and
> 'second' to represent the begin and [past] the end iterators,
> respectively): This is rather handy if you have functions producing
> sequences which are then in turn to be used as input to functions
> taking sequence.
I've been wanting such a thing for a long time. I second that ! :)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk