Fix incorrect results from std::boyer_moore_searcher
commit60d8661c0f0ee04d16d6392772688630040068cf
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Apr 2017 11:08:00 +0000 (18 11:08 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Apr 2017 11:08:00 +0000 (18 11:08 +0000)
treef1da49d134b59a41eab81dbf0982d1e9c2227f21
parent58a208660e3480b61a0a9e1e0695ab69777e1300
Fix incorrect results from std::boyer_moore_searcher

* include/std/functional (default_searcher, __boyer_moore_array_base)
(__is_std_equal_to, __boyer_moore_base_t, boyer_moore_searcher)
(boyer_moore_horspool_searcher): Remove redundant namespace
qualification.
(default_searcher::operator()): Construct return value early and
advance second member in-place.
(boyer_moore_horspool_searcher::operator()): Increment random access
iterator directly instead of using std::next.
(boyer_moore_searcher::operator()): Fix return value.
* testsuite/20_util/function_objects/searchers.cc: Check both parts
of return values.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246964 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/functional
libstdc++-v3/testsuite/20_util/function_objects/searchers.cc