OSDN Git Service

2011-10-01 Fran├žois Dumont <fdumont@gcc.gnu.org>
authorfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 1 Oct 2011 19:21:57 +0000 (19:21 +0000)
committerfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 1 Oct 2011 19:21:57 +0000 (19:21 +0000)
        * include/debug/vector (vector<>::erase(iterator, iterator): Check
        iterators equality using normal iterators.
        * include/debug/deque (deque<>::erase(iterator, iterator): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179414 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/debug/deque
libstdc++-v3/include/debug/vector

index 8a15c8c..a03f1af 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-01  Fran├žois Dumont  <fdumont@gcc.gnu.org>
+
+       * include/debug/vector (vector<>::erase(iterator, iterator): Check
+       iterators equality using normal iterators.
+       * include/debug/deque (deque<>::erase(iterator, iterator): Likewise.
+
 2011-09-29  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/bits/hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)):
index 2bce992..07b332b 100644 (file)
@@ -465,7 +465,7 @@ namespace __debug
        // 151. can't currently clear() empty container
        __glibcxx_check_erase_range(__first, __last);
 
-       if (__first == __last)
+       if (__first.base() == __last.base())
          return __first;
         else if (__first.base() == _Base::begin()
                 || __last.base() == _Base::end())
index 865c275..0f252a0 100644 (file)
@@ -499,7 +499,7 @@ namespace __debug
        // 151. can't currently clear() empty container
        __glibcxx_check_erase_range(__first, __last);
 
-       if (__first != __last)
+       if (__first.base() != __last.base())
          {
            difference_type __offset = __first.base() - _Base::begin();
            _Base_iterator __res = _Base::erase(__first.base(),