mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 21:33:59 +08:00
stl_algobase.h (std::equal): avoid use of possibly-undefined operator != (one line patch).
2001-04-06 Joe Buck <jbuck@welsh-buck.org> * stl_algobase.h (std::equal): avoid use of possibly-undefined operator != (one line patch). From-SVN: r41170
This commit is contained in:
parent
a1fae79477
commit
14bc1c0e15
@ -1,3 +1,12 @@
|
||||
2001-04-06 Gabriel Dos Reis <gdr@codesourcery.com>
|
||||
|
||||
* testsuite/25_algorithms/equal.cc: New test.
|
||||
|
||||
2001-04-06 Joe Buck <jbuck@welsh-buck.org>
|
||||
|
||||
* stl_algobase.h (std::equal): avoid use of possibly-undefined
|
||||
operator != (one line patch).
|
||||
|
||||
2001-04-06 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* include/backward/backward_warning.h: Re-enable.
|
||||
|
@ -540,7 +540,7 @@ inline bool equal(_InputIter1 __first1, _InputIter1 __last1,
|
||||
typename iterator_traits<_InputIter2>::value_type>);
|
||||
|
||||
for ( ; __first1 != __last1; ++__first1, ++__first2)
|
||||
if (*__first1 != *__first2)
|
||||
if (!(*__first1 == *__first2))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user