Subject: Re: [boost] [iterator] counting_iterator::referenceshouldbevalue_type?
From: David Abrahams (dave_at_[hidden])
Date: 2009-01-06 19:46:10
on Tue Jan 06 2009, Arno SchÃ¶dl <aschoedl-AT-think-cell.com> wrote:
>>> It seems to me that the standard should specify whether iterator::reference must
>>> outlive its iterator.
>> That's a separate issue. It doesn't.
> I am confused. As far as I understand, Bo Persson just posted that
> this has been clarified:
I see, yes, for the next standard.
> So reference/pointer do not outlive their iterator, and in our case,
> boost::counting_iterator is correct and boost::reverse_iterator is wrong.
With respect to C++0x, that's correct.
I wonder if this means we really are missing an important concept. It
seems to me that the requirement to store a temporary iterator is a
potentially high cost that can be avoided for most iterators, which have
-- Dave Abrahams BoostPro Computing http://www.boostpro.com