commit | b9595b79f22b54fc2cd85a2a1d4040d84f08692a | [log] [tgz] |
---|---|---|
author | Marshall Clow <[email protected]> | Mon Feb 02 18:16:35 2015 |
committer | Marshall Clow <[email protected]> | Mon Feb 02 18:16:35 2015 |
tree | e57ecbe580fe8afd5a3ca00b1a2f024dcc535752 | |
parent | c6b299c8c42199428d2abcb4e977b24e9819c020 [diff] [blame] |
Fix PR#22433. The algorithm is_partitioned was testing an item in the middle of the sequence twice. llvm-svn: 227824
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 9c51284..e8720cc 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm
@@ -3148,6 +3148,9 @@ for (; __first != __last; ++__first) if (!__pred(*__first)) break; + if ( __first == __last ) + return true; + ++__first; for (; __first != __last; ++__first) if (__pred(*__first)) return false;