mirror of git://gcc.gnu.org/git/gcc.git
vector (vector<>::erase(iterator, iterator): Check iterators equality using normal iterators.
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. From-SVN: r179414
This commit is contained in:
parent
e323640fb2
commit
cdfa3dbb86
|
@ -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>
|
2011-09-29 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
* include/bits/hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)):
|
* include/bits/hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)):
|
||||||
|
|
|
@ -465,7 +465,7 @@ namespace __debug
|
||||||
// 151. can't currently clear() empty container
|
// 151. can't currently clear() empty container
|
||||||
__glibcxx_check_erase_range(__first, __last);
|
__glibcxx_check_erase_range(__first, __last);
|
||||||
|
|
||||||
if (__first == __last)
|
if (__first.base() == __last.base())
|
||||||
return __first;
|
return __first;
|
||||||
else if (__first.base() == _Base::begin()
|
else if (__first.base() == _Base::begin()
|
||||||
|| __last.base() == _Base::end())
|
|| __last.base() == _Base::end())
|
||||||
|
|
|
@ -499,7 +499,7 @@ namespace __debug
|
||||||
// 151. can't currently clear() empty container
|
// 151. can't currently clear() empty container
|
||||||
__glibcxx_check_erase_range(__first, __last);
|
__glibcxx_check_erase_range(__first, __last);
|
||||||
|
|
||||||
if (__first != __last)
|
if (__first.base() != __last.base())
|
||||||
{
|
{
|
||||||
difference_type __offset = __first.base() - _Base::begin();
|
difference_type __offset = __first.base() - _Base::begin();
|
||||||
_Base_iterator __res = _Base::erase(__first.base(),
|
_Base_iterator __res = _Base::erase(__first.base(),
|
||||||
|
|
Loading…
Reference in New Issue