> -----Original Message----- > From: Martin Sebor [mailto:[EMAIL PROTECTED] > Sent: Monday, July 09, 2007 8:05 PM > To: stdcxx-dev@incubator.apache.org > 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. > > http://svn.apache.org/viewvc?view=rev&revision=507940
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 mebmers has changed, but it's still valid "end iterator". If we decide to set deque<>._C_end._C_node = 0 for end iterator of empty deque It would be a big change (we should change the all places where _C_end._C_node member dereferenced). Farid.