Commit 5b4ca306 by Jonathan Wakely Committed by Jonathan Wakely

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
parent f2f6dece
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> 2017-01-19 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/79156 PR libstdc++/79156
...@@ -7,7 +13,7 @@ ...@@ -7,7 +13,7 @@
* testsuite/ext/shared_ptr/1.cc: New test. * testsuite/ext/shared_ptr/1.cc: New test.
PR libstdc++/64903 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. point.
* testsuite/25_algorithms/is_partitioned/2.cc: New test. * testsuite/25_algorithms/is_partitioned/2.cc: New test.
......
...@@ -585,7 +585,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -585,7 +585,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__first = std::find_if_not(__first, __last, __pred); __first = std::find_if_not(__first, __last, __pred);
if (__first == __last) if (__first == __last)
return true; return true;
std::advance(__first, 1); ++__first;
return std::none_of(__first, __last, __pred); return std::none_of(__first, __last, __pred);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment