This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/58358] [4.7/4.8 Regression] search_n has a Complexity violation for random access iterator
- From: "paolo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 Sep 2013 10:20:01 +0000
- Subject: [Bug libstdc++/58358] [4.7/4.8 Regression] search_n has a Complexity violation for random access iterator
- Auto-submitted: auto-generated
- References: <bug-58358-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58358
--- Comment #26 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Thu Sep 19 10:19:58 2013
New Revision: 202736
URL: http://gcc.gnu.org/viewcvs?rev=202736&root=gcc&view=rev
Log:
2013-09-19 Mitsuru Kariya <kariya_mitsuru@hotmail.com>
Chris Jefferson <chris@bubblescope.net>
PR libstdc++/58358
* include/bits/stl_algo.h (search_n): Fix to guarantee a number
of comparisons <= number of elements in the range.
* testsuite/25_algorithms/search_n/58358.cc: New.
* testsuite/25_algorithms/search_n/iterator.cc: Extend.
Added:
branches/gcc-4_8-branch/libstdc++-v3/testsuite/25_algorithms/search_n/58358.cc
Modified:
branches/gcc-4_8-branch/libstdc++-v3/ChangeLog
branches/gcc-4_8-branch/libstdc++-v3/include/bits/stl_algo.h
branches/gcc-4_8-branch/libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc