[libcxx-commits] [libcxx] [libc++] Avoid transitive inclusion for `<__algorithm/find.h>` (PR #162508)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 8 09:19:50 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: A. Jiang (frederick-vs-ja)
<details>
<summary>Changes</summary>
Currently, `size_t` and `__libcpp_is_constant_evaluated` are obtained by transitive inclusion in `<__algorithm/find.h>` when `<cwchar>` is not included. This broke module build when `_LIBCPP_HAS_WIDE_CHARACTERS` is `1` and caused CI failure. We should explicitly include the corresponding internal headers.
---
Full diff: https://github.com/llvm/llvm-project/pull/162508.diff
1 Files Affected:
- (modified) libcxx/include/__algorithm/find.h (+2)
``````````diff
diff --git a/libcxx/include/__algorithm/find.h b/libcxx/include/__algorithm/find.h
index 72e201a3c693b..10379d7074c3a 100644
--- a/libcxx/include/__algorithm/find.h
+++ b/libcxx/include/__algorithm/find.h
@@ -17,12 +17,14 @@
#include <__bit/countr.h>
#include <__bit/invert_if.h>
#include <__config>
+#include <__cstddef/size_t.h>
#include <__functional/identity.h>
#include <__fwd/bit_reference.h>
#include <__iterator/segmented_iterator.h>
#include <__string/constexpr_c_functions.h>
#include <__type_traits/enable_if.h>
#include <__type_traits/invoke.h>
+#include <__type_traits/is_constant_evaluated.h>
#include <__type_traits/is_equality_comparable.h>
#include <__type_traits/is_integral.h>
#include <__type_traits/is_signed.h>
``````````
</details>
https://github.com/llvm/llvm-project/pull/162508
More information about the libcxx-commits
mailing list