|
[
Permlink
| « Hide
]
Farid Zaripov added a comment - 02/Nov/07 02:47 PM
The addition information can be found in this thread: http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03868.html
Personally, I don't think that this is a bug.
After swap operation the d1.begin() == d1.end() and they are valid end iterators for the d1 (d2.begin() == d2.end() and they are valid end iterators for the d2). The only thing that was changed is the binary representation of the iterators, so that operator==(d1.begin() before swap, d2.begin() after swap) returns false. Just for the information: the Dinkumware STL has the same behavior even on non-empty deque's, because its std::deque::iterator has member deque*_Mycont, so the before swap d1.begin()._Mycont == &d1; after swap d2.begin()._Mycont == &d2; and as a result d1.begin() != d2.begin() in any case. See the discussion: http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03868.html
Fixed thus: http://svn.apache.org/viewvc?rev=637539&view=rev
The _C_cur data member of the deque iterator equal to 0 if and only if the deque is empty. Issue will be closed after successfull nightly testing and merging in 4.2.x branch.
Merged in 4.2.x branch thus: http://svn.apache.org/viewvc?view=rev&revision=648752
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||