Boost logo

Boost :

Subject: Re: [boost] lifetime of ranges vs. iterators
From: Arno Schödl (aschoedl_at_[hidden])
Date: 2008-09-03 15:16:31

> > 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 don't need to. The underlying iterator can check explicitly. Only the adaptors must pass this information up with zero overhead, e.g., by doing nothing.


Dr. Arno Schoedl · aschoedl_at_[hidden] 
Technical Director 
think-cell Software GmbH · Invalidenstr. 34 · 10115 Berlin, Germany · phone +49-30-666473-10 · toll-free (US) +1-800-891-8091
Directors: Dr. Markus Hannebauer, Dr. Arno Schoedl · Amtsgericht Charlottenburg, HRB 85229

Boost list run by bdawes at, gregod at, cpdaniel at, john at