[libcxx-commits] [libcxx] [libc++] Fix ambiguous call in {ranges, std}::find (PR #122641)

Peng Liu via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 11 14:46:15 PST 2025


================
@@ -10,9 +10,6 @@
 #define _LIBCPP___FWD_BIT_REFERENCE_H
 
 #include <__config>
-#include <__memory/pointer_traits.h>
-#include <__type_traits/enable_if.h>
-#include <__type_traits/is_unsigned.h>
----------------
winner245 wrote:

These includes were previously added due to #122410, which defined `__trailing_mask` and `__middle_mask` functions with SFINAE constraints. However, my final commit in that PR removed these functions but forgot to remove the includes. Now this PR re-introduces these `__trailing_mask` and `__middle_mask` functions because they will also be needed to fix other range algorithms with `__bit_iterator` optimizations. However, in this version, I replaced SFINAE constraints by `static_assert`. So I no longer need the header files used by SFINAE.  

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


More information about the libcxx-commits mailing list