Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-11-12 21:05:27


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.

-- 
Dave Abrahams
Boost Consulting
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