Subject: Re: [boost] lifetime of ranges vs. iterators
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-09-03 15:13:51


AMDG

David Abrahams wrote:
>> Using Arno's suggestion, dereferencing the end iterator
>> ought to throw, which happens before we increment
>> off the end, right?
>>
>
> The *underlying* iterator? How are you going to get that to throw if
> it's a pointer?

You would have to wrap it. Any solution using iterators adapters
is going to have to rely on detecting whether an iterator knows
it's own end.

In Christ,
Steven Watanabe