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 http://www.think-cell.com Â· 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 acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk