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
This commit is contained in:
Douglas Gregor 2006-04-14 17:35:06 +00:00 committed by Paolo Carlini
parent 43b373a2a5
commit 008712ae1c
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -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;