This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] PR libstdc++/50529


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

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())

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]