incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <>
Subject RE: 23.deque.special
Date Mon, 09 Jul 2007 18:26:48 GMT
> -----Original Message-----
> From: Martin Sebor [] 
> Sent: Monday, July 09, 2007 8:05 PM
> To:
> Subject: Re: 23.deque.special
> Right, I think that will be necessary. I was under the 
> impression that you already did that in the change below but 
> now that I've re-read it I think that issue might be about 
> something else.

  In this change I just corrected _C_begin and _C_end members
of empty deque after swap operaton.

> > 
> >> Are you suggesting to loosen the test so as not to exercise this
> > requirement?
> >   I suggest only not to exercise iterators if one deque is empty.
> But that would only hide the bug. swapping empty deques needs 
> to work (and not invalidate iterators) just as well as 
> swapping ones with elements.

  But in current implementation iterator not invalidated. Yes, it's
has changed, but it's still valid "end iterator".

  If we decide to set deque<>._C_end._C_node = 0 for end iterator of
deque It would be a big change (we should change the all places where
_C_end._C_node member dereferenced).


View raw message