Commit 14bc1c0e by Benjamin Kosnik

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
parent a1fae794
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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment