diff options
| author | Louis Dionne <ldionne@apple.com> | 2019-07-04 20:00:39 +0000 |
|---|---|---|
| committer | Louis Dionne <ldionne@apple.com> | 2019-07-04 20:00:39 +0000 |
| commit | 989cad247609bc2f2ae4cd16f4e90047a7604b60 (patch) | |
| tree | 1197bd7376548289f8376318984c41daff7a6bb3 /pstl/test/std/algorithms/alg.modifying.operations | |
| parent | c494481ea4f866c922521fd928166d10518ab957 (diff) | |
| download | bcm5719-llvm-989cad247609bc2f2ae4cd16f4e90047a7604b60.tar.gz bcm5719-llvm-989cad247609bc2f2ae4cd16f4e90047a7604b60.zip | |
[pstl] Use utilities from <functional> instead of reinventing the wheel
llvm-svn: 365158
Diffstat (limited to 'pstl/test/std/algorithms/alg.modifying.operations')
| -rw-r--r-- | pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp index b1f6cd992db..a391ba8ba7a 100644 --- a/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp +++ b/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp @@ -12,9 +12,10 @@ // Tests for stable_partition and partition_copy #include "support/pstl_test_config.h" -#include <execution> #include <algorithm> #include <cstdlib> +#include <execution> +#include <functional> #include <iterator> #include "support/utils.h" @@ -26,16 +27,15 @@ struct test_partition_copy template <typename Policy, typename InputIterator, typename OutputIterator, typename OutputIterator2, typename UnaryOp> void - operator()(Policy&& exec, InputIterator first, InputIterator last, OutputIterator true_first, - OutputIterator, OutputIterator2 false_first, OutputIterator2, UnaryOp unary_op) + operator()(Policy&& exec, InputIterator first, InputIterator last, OutputIterator true_first, OutputIterator, + OutputIterator2 false_first, OutputIterator2, UnaryOp unary_op) { auto actual_ret = std::partition_copy(exec, first, last, true_first, false_first, unary_op); EXPECT_TRUE(std::distance(true_first, actual_ret.first) == std::count_if(first, last, unary_op), "partition_copy has wrong effect from true sequence"); - EXPECT_TRUE(std::distance(false_first, actual_ret.second) == - std::count_if(first, last, __pstl::__internal::__not_pred<UnaryOp>(unary_op)), + EXPECT_TRUE(std::distance(false_first, actual_ret.second) == std::count_if(first, last, std::not_fn(unary_op)), "partition_copy has wrong effect from false sequence"); } |

