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

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 14 10:02:59 PDT 2024


================
@@ -31,7 +31,8 @@ struct MyAlloc {
 int main(int, char**)
 {
     std::vector<bool, MyAlloc<bool>> vb;
-    std::vector<bool, MyAlloc<bool>> wb(100);
+    // std::fill_n triggers ADL beacuse __bit_iterator has the container type as a template argument
----------------
ldionne wrote:

```suggestion
    // std::fill_n triggers ADL because __bit_iterator has the container type as a template argument
```

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


More information about the libcxx-commits mailing list