Boost logo

Boost :

From: Eric Woodruff (Eric.Woodruff_at_[hidden])
Date: 2002-10-13 23:00:06


I think he was trying to imply something of how a reverse iterator adaptor
might be implemented to effectively set an iterator = end () and then
perform operator-- on it when operator++ is called.

I'm not aware of how much the standard makes direct statements such that
those easy implementations of reverse iterators could be created.

"Victor A. Wagner, Jr." <vawjr_at_[hidden]> wrote in message
news:4.3.1.2.20021013195650.058d7d90_at_mail.rudbek.com...
At Sunday 2002/10/13 16:39, you wrote:

>"Terje Slettebø" <tslettebo_at_[hidden]> wrote in message
>news:058901c272c8$a261f6b0$60fb5dd5_at_pc...
> >From: "Yitzhak Sapir" <yitzhaks_at_[hidden]>
>
> >On Sun, 13 Oct 2002, [iso-8859-1] Terje Slettebø wrote:
>
>
> >As I understand, the only thing you can safely do with an end() iterator
is
> >to compare it with other iterators.
>
> If operator-- is defined on an iterator, and begin() != end(), then it
is
>also safe to decrement an iterator that is equal to end().
>reverse_iterators depend on this fact. This is why rbegin().base() ==
>end().

I don't see how that follows. I agree that rbegin().base() == end(), but
don't see how that implies that ANY operations on end() are legal.

>Joe Gottman
>
>
>
>
>_______________________________________________
>Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost

Victor A. Wagner Jr. http://rudbek.com
PGP RSA fingerprint = 4D20 EBF6 0101 B069 3817 8DBF C846 E47A
PGP D-H fingerprint = 98BC 65E3 1A19 43EC 3908 65B9 F755 E6F4 63BB 9D93
The five most dangerous words in the English language:
               "There oughta be a law"

_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


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