From 5b4ca3060a9cd95cb837542049e37400dad22b3b Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 20 Jan 2017 00:33:25 +0000 Subject: [PATCH] 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 --- libstdc++-v3/ChangeLog | 8 +++++++- libstdc++-v3/include/bits/stl_algo.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) 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); } -- 2.30.2