Boost logo

Boost :

Subject: Re: [boost] lifetime of ranges vs. iterators
From: David Abrahams (dave_at_[hidden])
Date: 2008-09-07 08:18:55


on Sun Sep 07 2008, Arno Schödl <aschoedl-AT-think-cell.com> wrote:

>> Thinking about it some more, I believe the associated_range abstraction is not
>> quite the right one yet. It works for forward_ranges, which is why I did not
>> notice earlier, but not for bidirectional and random_access_ranges.
>>
>> > The correct abstration is bounded_iterator, which is an iterator + the
> knowledge
>> > of whatever bounds it needs.
>
>> Only if you don't care about eliminating other redundancies.
>
> What are your referring to specificly? If you are referring to storing the
> predicate or stride length, this is taken care of because the iterator adaptor
> stack stores this information only once:

I'm talking about "vertical" redundancies between layers of the stack.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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