Boost logo

Boost :

From: Giovanni Bavestrelli (gibav_at_[hidden])
Date: 2000-12-03 10:09:56


--- In boost_at_[hidden], Kevlin Henney <kevlin_at_c...> wrote:
> In message <90bn2c+o6d5_at_e...>, Giovanni Bavestrelli
> <gibav_at_y...> writes
> [...]
> My gut instinct, in terms of
> defaults, is have the class follow the STL model. For some
container c
> with constant-time lookup and random access iterators the
expectation
> would be
>
> c.begin()[i] is equivalent to c[i]
> c.begin() + c.size() == c.end()
>
>[...]
>
> To iterate over all elements conveniently there seem to be two
choices:
> (1) provide an adapter or (2) provide separate iterator access
functions
> eg begin_all and end_all.
>
> Thoughts?
>

All this sounds reasonable to me. I am not sure about how to
implement the adaptor and how fast this would be, while begin_all and
end_all would be trivial and fast.

Giovanni Bavestrelli


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