summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Derek Mauro <dmauro@google.com>2023-06-26 12:30:38 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-06-26 12:31:42 -0700
commite6c09ae4b2acd421a29706f86e66eaa422262ad0 (patch)
tree73027b56fab06c316693049e19010e774fb680ed
parent20089ec0e4cd409cb5428223db168f5e88d7035f (diff)
Fix the check for #include <bit>
Previously this was guarded with macros that are defined by <bit> itself. Note that libc++ also had a bug that was fixed last week https://github.com/llvm/llvm-project/commit/a4f0764aefd6ea41e83a5974f582a1a7e985667d PiperOrigin-RevId: 543511181 Change-Id: I1b8efa32f721ad450f8d1803c6c6c8373ad0371c
-rw-r--r--absl/numeric/bits.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/absl/numeric/bits.h b/absl/numeric/bits.h
index df81b9a9..5466af07 100644
--- a/absl/numeric/bits.h
+++ b/absl/numeric/bits.h
@@ -38,13 +38,13 @@
#include <limits>
#include <type_traits>
-#if (defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L) || \
- (defined(__cpp_lib_bitops) && __cpp_lib_bitops >= 201907L)
+#include "absl/base/config.h"
+
+#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 202002L
#include <bit>
#endif
#include "absl/base/attributes.h"
-#include "absl/base/config.h"
#include "absl/numeric/internal/bits.h"
namespace absl {