re PR libstdc++/87872 (debug list::splice should not call _M_transfer_from_if on self-splices)

2018-11-06  John Bytheway  <jbytheway@gmail.com>

	PR libstdc++/87872
	* include/debug/safe_sequence.tcc
	(_Safe_sequence<>::_M_transfer_from_if): Skip transfer to self.

From-SVN: r265851
This commit is contained in:
John Bytheway 2018-11-06 20:20:06 +00:00 committed by François Dumont
parent 996bea89df
commit cdc71993cf
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2018-11-06 John Bytheway <jbytheway@gmail.com>
PR libstdc++/87872
* include/debug/safe_sequence.tcc
(_Safe_sequence<>::_M_transfer_from_if): Skip transfer to self.
2018-10-31 Joseph Myers <joseph@codesourcery.com> 2018-10-31 Joseph Myers <joseph@codesourcery.com>
PR bootstrap/82856 PR bootstrap/82856

View File

@ -68,6 +68,9 @@ namespace __gnu_debug
_Safe_sequence<_Sequence>:: _Safe_sequence<_Sequence>::
_M_transfer_from_if(_Safe_sequence& __from, _Predicate __pred) _M_transfer_from_if(_Safe_sequence& __from, _Predicate __pred)
{ {
if (this == std::__addressof(__from))
return;
typedef typename _Sequence::iterator iterator; typedef typename _Sequence::iterator iterator;
typedef typename _Sequence::const_iterator const_iterator; typedef typename _Sequence::const_iterator const_iterator;