[libcxx-commits] [libcxx] [libc++] Fix endianness for algorithm mismatch (PR #93082)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 11 03:47:30 PDT 2024


================
@@ -11,7 +11,11 @@
 
 #include <__algorithm/min.h>
 #include <__bit/bit_cast.h>
-#include <__bit/countr.h>
+#if defined(_LIBCPP_BIG_ENDIAN)
+#  include <__bit/countl.h>
+#else
+#  include <__bit/countr.h>
+#endif
----------------
philnik777 wrote:

Let's just include both of them unconditionally. They're really not large enough to make it worth the conditional, and we try to avoid including headers conditionally in detail headers.

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


More information about the libcxx-commits mailing list