[libcxx-commits] [libcxx] [libc++] Optimize ranges::equal for vector<bool>::iterator (PR #121084)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 25 09:15:51 PST 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 6e3631d0e3316394ff4eae2913013d323e685790 40b8a424f23cb0f8b207d813a9abd7191ddfb364 --extensions ,cpp,h -- libcxx/include/__algorithm/equal.h libcxx/include/__bit_reference libcxx/include/bitset libcxx/test/benchmarks/algorithms/equal.bench.cpp libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/ranges.equal.pass.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp
index 5e204cbfe6..342cd353e3 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp
@@ -198,9 +198,9 @@ struct TestTypes {
 
 int main(int, char**) {
   test();
-  #if TEST_STD_VER >= 20
-    static_assert(test());
-  #endif
+#if TEST_STD_VER >= 20
+  static_assert(test());
+#endif
 
   types::for_each(types::integer_types(), TestTypes());
   types::for_each(types::as_pointers<types::cv_qualified_versions<int> >(),

``````````

</details>


https://github.com/llvm/llvm-project/pull/121084


More information about the libcxx-commits mailing list