From: Jonathan Wakely Date: Fri, 20 Jan 2017 00:33:25 +0000 (+0000) Subject: PR64903 simplify last fix to std::is_partitioned X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5b4ca3060a9cd95cb837542049e37400dad22b3b;p=gcc.git PR64903 simplify last fix to std::is_partitioned PR libstdc++/64903 * include/bits/stl_algo.h (is_partitioned): Use increment instead of std::advance. From-SVN: r244675 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 45a2c67aa7c..4cb727c8a44 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2017-01-20 Jonathan Wakely + + PR libstdc++/64903 + * include/bits/stl_algo.h (is_partitioned): Use increment instead of + std::advance. + 2017-01-19 Jonathan Wakely PR libstdc++/79156 @@ -7,7 +13,7 @@ * testsuite/ext/shared_ptr/1.cc: New test. PR libstdc++/64903 - * include/bits/stl_algo.h (is_partioned): Don't retest the partition + * include/bits/stl_algo.h (is_partitioned): Don't retest the partition point. * testsuite/25_algorithms/is_partitioned/2.cc: New test. diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index 8cf85aa02f2..938e61244de 100644 --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -585,7 +585,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __first = std::find_if_not(__first, __last, __pred); if (__first == __last) return true; - std::advance(__first, 1); + ++__first; return std::none_of(__first, __last, __pred); }