On Mon, Mar 24, 2003 at 10:35:18AM +0100, Alfredo Braunstein wrote:
> Andre Poenitz wrote:
> 
> >   reference operator*() const {
> >     _Iterator __tmp = current;
> >     return *--__tmp;
>              ^^^^^^^^
> So it seems to me that it points to one before start. (i.e. its dereference
> gives that element in this implementation). Or what's the definition of
> pointing?

It does so only if you dereference things (that within operator* after
all). You are not allowed to do that for rbegin() Internally there is never
an invalid pointer stored.

> PS: I see at the c++ annotations:
> 
> vector::reverse_iterator vector::rend(): 
> this member returns an iterator pointing before the first element in the
> vector.

This is wrong. If this is very sloppy speach it might pass as
"explanation", though.

> I guess I look at the stl

The STL has no relevance here. It's all about the Standard.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

Reply via email to