PR64903 simplify last fix to std::is_partitioned
authorJonathan Wakely <jwakely@redhat.com>
Fri, 20 Jan 2017 00:33:25 +0000 (00:33 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 20 Jan 2017 00:33:25 +0000 (00:33 +0000)
PR libstdc++/64903
* include/bits/stl_algo.h (is_partitioned): Use increment instead of
std::advance.

From-SVN: r244675

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_algo.h

index 45a2c67aa7c4eda326bc57037f27734f809d5c0f..4cb727c8a44e9b31190f953858e3f8872869e047 100644 (file)
@@ -1,3 +1,9 @@
+2017-01-20  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/64903
+       * include/bits/stl_algo.h (is_partitioned): Use increment instead of
+       std::advance.
+
 2017-01-19  Jonathan Wakely  <jwakely@redhat.com>
 
        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.
 
index 8cf85aa02f2bdaa934859179c5895cfc8c92ea48..938e61244de8212b29d9df57d4f2a9331aa25fa2 100644 (file)
@@ -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);
     }