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.sorting | |
| 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.sorting')
| -rw-r--r-- | pstl/test/std/algorithms/alg.sorting/alg.set.operations/includes.pass.cpp | 8 | ||||
| -rw-r--r-- | pstl/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/pstl/test/std/algorithms/alg.sorting/alg.set.operations/includes.pass.cpp b/pstl/test/std/algorithms/alg.sorting/alg.set.operations/includes.pass.cpp index 8851ceca000..2f4a72f5b2f 100644 --- a/pstl/test/std/algorithms/alg.sorting/alg.set.operations/includes.pass.cpp +++ b/pstl/test/std/algorithms/alg.sorting/alg.set.operations/includes.pass.cpp @@ -11,9 +11,10 @@ #include "support/pstl_test_config.h" +#include <algorithm> #include <cmath> #include <execution> -#include <algorithm> +#include <functional> #include "support/utils.h" @@ -57,8 +58,7 @@ struct test_one_policy template <typename Policy, typename InputIterator1, typename InputIterator2, typename Compare> typename std::enable_if<TestUtils::isReverse<InputIterator1>::value, void>::type - operator()(Policy&&, InputIterator1, InputIterator1, InputIterator2, InputIterator2, - Compare) + operator()(Policy&&, InputIterator1, InputIterator1, InputIterator2, InputIterator2, Compare) { } }; @@ -98,7 +98,7 @@ int32_t main() { - test_includes<float64_t, float64_t>(__pstl::__internal::__pstl_less()); + test_includes<float64_t, float64_t>(std::less<>()); test_includes<Num<int64_t>, Num<int32_t>>([](const Num<int64_t>& x, const Num<int32_t>& y) { return x < y; }); std::cout << done() << std::endl; diff --git a/pstl/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp b/pstl/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp index b54a6b6f6c1..35ab452d516 100644 --- a/pstl/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp +++ b/pstl/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp @@ -11,10 +11,11 @@ #include "support/pstl_test_config.h" -#include <cmath> +#include <algorithm> #include <chrono> +#include <cmath> #include <execution> -#include <algorithm> +#include <functional> #include "support/utils.h" @@ -97,8 +98,7 @@ struct test_one_policy template <typename Policy, typename InputIterator1, typename InputIterator2, typename Compare> typename std::enable_if<TestUtils::isReverse<InputIterator1>::value, void>::type - operator()(Policy&&, InputIterator1, InputIterator1, InputIterator2, InputIterator2, - Compare) + operator()(Policy&&, InputIterator1, InputIterator1, InputIterator2, InputIterator2, Compare) { } }; @@ -151,7 +151,7 @@ int32_t main() { - test_set<float64_t, float64_t>(__pstl::__internal::__pstl_less()); + test_set<float64_t, float64_t>(std::less<>()); test_set<Num<int64_t>, Num<int32_t>>([](const Num<int64_t>& x, const Num<int32_t>& y) { return x < y; }); test_algo_basic_double<int32_t>(run_for_rnd_fw<test_non_const<int32_t>>()); |

