diff mbox

[v3] PR libstdc++/50529

Message ID 4E876A07.7060506@gmail.com
State New
Headers show

Commit Message

François Dumont Oct. 1, 2011, 7:29 p.m. UTC
On 09/29/2011 10:59 PM, Paolo Carlini wrote:
>> Ok to commit ?
> Ok. These patches are going also to 4_6-branch.
>
> Paolo
>
Attached patch applied, thanks Paolo for applying it to 4.6 branch.

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.

Regards
diff mbox

Patch

Index: include/debug/vector
===================================================================
--- include/debug/vector	(revision 179319)
+++ include/debug/vector	(working copy)
@@ -499,7 +499,7 @@ 
 	// 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(),
Index: include/debug/deque
===================================================================
--- include/debug/deque	(revision 179319)
+++ include/debug/deque	(working copy)
@@ -465,7 +465,7 @@ 
 	// 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())