Commit 008712ae by Douglas Gregor Committed by Paolo Carlini

re PR libstdc++/27162 (search_n uses == when it should use binary_pred)

2006-04-14  Douglas Gregor  <dgregor@cs.indiana.edu>

	PR libstdc++/27162
	* include/bits/stl_algo.h (__search_n(,,,, _BinaryPredicate,
	std::forward_iterator_tag)): Use __binary_pred, not ==.

From-SVN: r112957
parent 43b373a2
2006-04-14 Douglas Gregor <dgregor@cs.indiana.edu>
PR libstdc++/27162
* include/bits/stl_algo.h (__search_n(,,,, _BinaryPredicate,
std::forward_iterator_tag)): Use __binary_pred, not ==.
2006-04-10 Matthias Klose <doko@debian.org>
* testsuite/lib/libstdc++.exp (libstdc++_init): Recognize multilib
......
......@@ -759,7 +759,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__n = __count;
_ForwardIterator __i = __first;
++__i;
while (__i != __last && __n != 1 && *__i == __val)
while (__i != __last && __n != 1 && __binary_pred(*__i, __val))
{
++__i;
--__n;
......
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