aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@cs.indiana.edu>2006-04-14 17:35:06 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2006-04-14 17:35:06 +0000
commit008712ae1cf581c664f18f44ccac6d36ccbf3b93 (patch)
tree4ecd48ce52c6acbd34089337360875d6fa19c5b0
parent43b373a2a5115268b5320b24f770a02b60353557 (diff)
downloadgcc-008712ae1cf581c664f18f44ccac6d36ccbf3b93.zip
gcc-008712ae1cf581c664f18f44ccac6d36ccbf3b93.tar.gz
gcc-008712ae1cf581c664f18f44ccac6d36ccbf3b93.tar.bz2
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
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/include/bits/stl_algo.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 2fcdcfa..93172b6 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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
diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h
index 7c54f50..8da0613 100644
--- a/libstdc++-v3/include/bits/stl_algo.h
+++ b/libstdc++-v3/include/bits/stl_algo.h
@@ -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;