[libcxx-commits] [libcxx] [libcxx] Add a missing include for __bit_iterator (PR #127015)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 12 23:07:25 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Takuto Ikuta (atetubou)

<details>
<summary>Changes</summary>

This is to fix compile error with explicit Clang modules like
```
../../third_party/libc++/src/include/__vector/vector_bool.h:85:11: error: default argument of '__bit_iterator' must be imported from module 'std.bit_reference_fwd' before it is required
   85 |   typedef __bit_iterator<vector, false> pointer;
      |           ^
../../third_party/libc++/src/include/__fwd/bit_reference.h:23:68: note: default argument declared here is not reachable
   23 | template <class _Cp, bool _IsConst, typename _Cp::__storage_type = 0>
      |                                                                    ^
```

---
Full diff: https://github.com/llvm/llvm-project/pull/127015.diff


1 Files Affected:

- (modified) libcxx/include/__vector/vector_bool.h (+1) 


``````````diff
diff --git a/libcxx/include/__vector/vector_bool.h b/libcxx/include/__vector/vector_bool.h
index 35f0f745e201c..714c86ae2bb96 100644
--- a/libcxx/include/__vector/vector_bool.h
+++ b/libcxx/include/__vector/vector_bool.h
@@ -18,6 +18,7 @@
 #include <__bit_reference>
 #include <__config>
 #include <__functional/unary_function.h>
+#include <__fwd/bit_reference.h>
 #include <__fwd/functional.h>
 #include <__fwd/vector.h>
 #include <__iterator/distance.h>

``````````

</details>


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


More information about the libcxx-commits mailing list