2006-04-14 Douglas Gregor <dgregor@cs.indiana.edu>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Apr 2006 17:35:06 +0000 (17:35 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Apr 2006 17:35:06 +0000 (17:35 +0000)
PR libstdc++/27162
* include/bits/stl_algo.h (__search_n(,,,, _BinaryPredicate,
std::forward_iterator_tag)): Use __binary_pred, not ==.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112957 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_algo.h

index 2fcdcfa..93172b6 100644 (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
index 7c54f50..8da0613 100644 (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;