Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-08-23 10:18:07


From: "Andrew Koenig" <ark_at_[hidden]>

> Peter> FWIW, after some days of thinking, I am now convinced that the
> Peter> operator[] requirement for random access iterators is a
> Peter> defect. Iterators don't need [], containers do.
>
> Iterators don't need -> either, but experience was that users expected
> all iterators to supply it because they were accustomed to using it
> with pointers. The same argument applies to [].

Yes, but generalized iterators can supply -> without serious penalty.
However, the same doesn't apply to []. It May not be a *defect*, per se,
but it was a mistake IMO.

-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com


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