Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-11-13 06:30:06


"David Abrahams" <dave_at_[hidden]> wrote in message
news:u3bzeo654.fsf_at_boost-consulting.com...
| John Torjo <john.lists_at_[hidden]> writes:
|
| >>>
| >>>1. std containers being ranges as defined in boost.range
| >>>2. a new concepts that refine the concepts of boost.range by adding
iteration
| >>>capabilities.
| >>>
| >>>I believe (2) is exactly what John is doing.
| >>>
| >>>-Thorsten
| >> It's a mistake to think of John's range as being a refinement of the
| >> boost.range concept. If I have a non-const range and I pass it off to
| >> an algorithm that traverses it, will the range be modified or not?
| >
| > Note: the range will *not* change (in case you pass it to a rng::
| > algorithm).
|
| If it is passed by reference it will change. Should I be unconcerned
| about that possibility? I'm not sure. The sort of range that a
| container is will normally be passed by reference.

that is a good point. In fact, boost.range ranges *must* always be passed by
reference or const reference.

-Thorsten


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