[libcxx-commits] [libcxx] [libc++] Forward std::all_of and std::none_of to std::any_of (PR #167670)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 17 06:48:20 PST 2025
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 origin/main HEAD --extensions h,cpp -- libcxx/test/std/algorithms/robust_against_nonbool.compile.pass copy.cpp libcxx/include/__algorithm/all_of.h libcxx/include/__algorithm/none_of.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/algorithms/robust_against_nonbool.compile.pass copy.cpp b/libcxx/test/std/algorithms/robust_against_nonbool.compile.pass copy.cpp
index 3b334fb6a..bb2ab022c 100644
--- a/libcxx/test/std/algorithms/robust_against_nonbool.compile.pass copy.cpp
+++ b/libcxx/test/std/algorithms/robust_against_nonbool.compile.pass copy.cpp
@@ -21,11 +21,11 @@
#include "boolean_testable.h"
#include "test_macros.h"
-using Value = StrictComparable<int>;
-using Iterator = StrictBooleanIterator<Value*>;
-using Range = std::ranges::subrange<Iterator>;
-auto pred1 = StrictUnaryPredicate;
-auto pred2 = StrictBinaryPredicate;
+using Value = StrictComparable<int>;
+using Iterator = StrictBooleanIterator<Value*>;
+using Range = std::ranges::subrange<Iterator>;
+auto pred1 = StrictUnaryPredicate;
+auto pred2 = StrictBinaryPredicate;
void f(Iterator it, Range in, Iterator out, std::size_t n, Value const& val, std::initializer_list<Value> ilist) {
(void)std::any_of(it, it, pred1);
@@ -76,15 +76,15 @@ void f(Iterator it, Range in, Iterator out, std::size_t n, Value const& val, std
(void)std::minmax_element(it, it);
(void)std::minmax_element(it, it, pred2);
(void)std::count_if(it, it, pred1);
- (void)std::search(it, it, it ,it);
- (void)std::search(it, it, it ,it, pred2);
+ (void)std::search(it, it, it, it);
+ (void)std::search(it, it, it, it, pred2);
(void)std::search_n(it, it, n, val);
(void)std::search_n(it, it, n, val, pred2);
- (void)std::is_partitioned(it ,it, pred1);
- (void)std::is_sorted(it ,it);
- (void)std::is_sorted(it ,it, pred2);
- (void)std::is_sorted_until(it ,it);
- (void)std::is_sorted_until(it ,it, pred2);
+ (void)std::is_partitioned(it, it, pred1);
+ (void)std::is_sorted(it, it);
+ (void)std::is_sorted(it, it, pred2);
+ (void)std::is_sorted_until(it, it);
+ (void)std::is_sorted_until(it, it, pred2);
(void)std::is_heap(it, it);
(void)std::is_heap(it, it, pred2);
(void)std::is_heap_until(it, it);
``````````
</details>
https://github.com/llvm/llvm-project/pull/167670
More information about the libcxx-commits
mailing list