[libcxx-commits] [libcxx] [libc++] Optimize ranges::copy{, _n} for vector<bool>::iterator (PR #121013)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 29 09:13:53 PST 2025


================
@@ -78,13 +99,21 @@ TEST_CONSTEXPR_CXX20 bool test() {
     assert(std::equal(a, a + 10, expected));
   }
 
+  { // Test vector<bool>::iterator optimization
+    assert(test_vector_bool(8));
----------------
ldionne wrote:

What about testing with an odd-sized vector? I'm sure it doesn't matter for performance, but it could matter for correctness and we don't seem to have coverage for that right now.

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


More information about the libcxx-commits mailing list