[libcxx-commits] [libcxx] [libc++] Fix ambiguous call in ranges::count & std::count (PR #122529)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 10 13:24:49 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 5912de9ede81407f93162e930ae9bc97e561d017 f3103bd663e68d350a00df4b1946ce698dd4114a --extensions h,cpp -- libcxx/test/support/sized_allocator.h libcxx/include/__algorithm/count.h libcxx/include/__bit/popcount.h libcxx/include/__fwd/bit_reference.h libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp
index b3a9ccca22..1da9ec07fb 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp
@@ -286,7 +286,7 @@ constexpr bool test() {
assert(ret == 1);
}
{
- int a[] = {5, 5, 4, 3, 2, 1};
+ int a[] = {5, 5, 4, 3, 2, 1};
auto range = std::ranges::subrange(DiffTypeIterator(a), DiffTypeIterator(a + 6));
std::same_as<signed char> decltype(auto) ret = std::ranges::count(range, 4);
assert(ret == 1);
``````````
</details>
https://github.com/llvm/llvm-project/pull/122529
More information about the libcxx-commits
mailing list