[libcxx-commits] [pstl] [ptsl] passed iterators directly to invoke_on_all_policies to avoid u… (PR #85679)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 18 11:37:40 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 457f762651e331341872abccbb7d7724c89cbf50 538172e305df9ab872cbe3adf482a3899c8e9e24 -- pstl/test/std/algorithms/alg.sorting/is_sorted.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/pstl/test/std/algorithms/alg.sorting/is_sorted.pass.cpp b/pstl/test/std/algorithms/alg.sorting/is_sorted.pass.cpp
index e1ef61dafc..bfedc311ba 100644
--- a/pstl/test/std/algorithms/alg.sorting/is_sorted.pass.cpp
+++ b/pstl/test/std/algorithms/alg.sorting/is_sorted.pass.cpp
@@ -21,7 +21,8 @@ using namespace TestUtils;
struct test_is_sorted
{
template <typename Policy, typename Iterator>
- void operator()(Policy&& exec, Iterator first, Iterator last, bool exam)
+ void
+ operator()(Policy&& exec, Iterator first, Iterator last, bool exam)
{
using namespace std;
typedef typename std::iterator_traits<Iterator>::value_type T;
@@ -45,7 +46,8 @@ struct test_is_sorted
};
template <typename T>
-void test_is_sorted_by_type()
+void
+test_is_sorted_by_type()
{
Sequence<T> in(99999, [](size_t v) -> T { return T(v); });
// fill 0..n
@@ -75,14 +77,16 @@ template <typename Iterator>
struct test_non_const
{
template <typename Policy>
- void operator()(Policy&& exec, Iterator iter)
+ void
+ operator()(Policy&& exec, Iterator iter)
{
is_sorted(exec, iter, iter, std::less<>());
is_sorted_until(exec, iter, iter, std::less<>());
}
};
-int main()
+int
+main()
{
test_is_sorted_by_type<int>();
test_is_sorted_by_type<double>();
``````````
</details>
https://github.com/llvm/llvm-project/pull/85679
More information about the libcxx-commits
mailing list