Skip to content

Commit

Permalink
Removed Google-only #ifdefs.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 565040001
Change-Id: I1c2e715c97375754c8d863132be2c388265ca4ad
  • Loading branch information
Abseil Team authored and tkiela1 committed Sep 13, 2023
1 parent f5b19ac commit 6c6b273
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions absl/numeric/bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ ABSL_NAMESPACE_BEGIN
// libc++ had the wrong signature for std::rotl and std::rotr
// prior to libc++ 18.0.
//
// b/289016048 requires a workaround for _LIBCPP_GOOGLE3.
#if (defined(__cpp_lib_bitops) && __cpp_lib_bitops >= 201907L) && \
(!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION >= 180000) && \
!defined(_LIBCPP_GOOGLE3)

#if (defined(__cpp_lib_bitops) && __cpp_lib_bitops >= 201907L) && \
(!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION >= 180000)
using std::rotl;
using std::rotr;

Expand All @@ -81,9 +78,11 @@ ABSL_MUST_USE_RESULT constexpr

#endif

// b/289016048 requires a workaround for _LIBCPP_GOOGLE3.
#if (defined(__cpp_lib_bitops) && __cpp_lib_bitops >= 201907L) && \
!defined(_LIBCPP_GOOGLE3)
// https://github.com/llvm/llvm-project/issues/64544
// libc++ had the wrong signature for std::rotl and std::rotr
// prior to libc++ 18.0.
//
#if (defined(__cpp_lib_bitops) && __cpp_lib_bitops >= 201907L)

using std::countl_one;
using std::countl_zero;
Expand Down Expand Up @@ -137,9 +136,7 @@ ABSL_INTERNAL_CONSTEXPR_POPCOUNT inline

#endif

// b/289016048 requires a workaround for _LIBCPP_GOOGLE3.
#if (defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L) && \
!defined(_LIBCPP_GOOGLE3)
#if (defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L)

using std::bit_ceil;
using std::bit_floor;
Expand Down

0 comments on commit 6c6b273

Please sign in to comment.