Go to the documentation of this file.
34 #ifndef ABSL_NUMERIC_BITS_H_
35 #define ABSL_NUMERIC_BITS_H_
39 #include <type_traits>
41 #if (defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L) || \
42 (defined(__cpp_lib_bitops) && __cpp_lib_bitops >= 201907L)
46 #include "absl/base/attributes.h"
47 #include "absl/base/config.h"
48 #include "absl/numeric/internal/bits.h"
53 #if !(defined(__cpp_lib_bitops) && __cpp_lib_bitops >= 201907L)
110 #else // defined(__cpp_lib_bitops) && __cpp_lib_bitops >= 201907L
122 #if !(defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L)
127 return x != 0 && (
x & (
x - 1)) == 0;
136 return std::numeric_limits<T>::digits -
166 #else // defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L
178 #endif // ABSL_NUMERIC_BITS_H_
ABSL_INTERNAL_CONSTEXPR_CTZ std::enable_if< std::is_unsigned< T >::value, int >::type countr_one(T x) noexcept
ABSL_NAMESPACE_BEGIN constexpr ABSL_MUST_USE_RESULT std::enable_if< std::is_unsigned< T >::value, T >::type rotl(T x, int s) noexcept
ABSL_ATTRIBUTE_ALWAYS_INLINE ABSL_INTERNAL_CONSTEXPR_CTZ int CountTrailingZeroes(T x) noexcept
#define ABSL_NAMESPACE_END
#define T(upbtypeconst, upbtype, ctype, default_value)
#define ABSL_INTERNAL_CONSTEXPR_CTZ
#define ABSL_MUST_USE_RESULT
#define ABSL_NAMESPACE_BEGIN
ABSL_MUST_USE_RESULT constexpr ABSL_ATTRIBUTE_ALWAYS_INLINE T RotateLeft(T x, int s) noexcept
ABSL_ATTRIBUTE_ALWAYS_INLINE ABSL_INTERNAL_CONSTEXPR_CLZ std::enable_if< std::is_unsigned< T >::value, T >::type BitCeilNonPowerOf2(T x)
ABSL_ATTRIBUTE_ALWAYS_INLINE ABSL_INTERNAL_CONSTEXPR_CLZ int CountLeadingZeroes(T x)
ABSL_MUST_USE_RESULT constexpr ABSL_ATTRIBUTE_ALWAYS_INLINE T RotateRight(T x, int s) noexcept
#define ABSL_INTERNAL_CONSTEXPR_POPCOUNT
ABSL_INTERNAL_CONSTEXPR_CTZ std::enable_if< std::is_unsigned< T >::value, int >::type countr_zero(T x) noexcept
constexpr std::enable_if< std::is_unsigned< T >::value, bool >::type has_single_bit(T x) noexcept
ABSL_INTERNAL_CONSTEXPR_CLZ std::enable_if< std::is_unsigned< T >::value, int >::type countl_one(T x) noexcept
ABSL_INTERNAL_CONSTEXPR_CLZ std::enable_if< std::is_unsigned< T >::value, T >::type bit_width(T x) noexcept
ABSL_INTERNAL_CONSTEXPR_CLZ std::enable_if< std::is_unsigned< T >::value, int >::type countl_zero(T x) noexcept
ABSL_INTERNAL_CONSTEXPR_POPCOUNT std::enable_if< std::is_unsigned< T >::value, int >::type popcount(T x) noexcept
#define ABSL_INTERNAL_CONSTEXPR_CLZ
ABSL_INTERNAL_CONSTEXPR_CLZ std::enable_if< std::is_unsigned< T >::value, T >::type bit_floor(T x) noexcept
constexpr ABSL_MUST_USE_RESULT std::enable_if< std::is_unsigned< T >::value, T >::type rotr(T x, int s) noexcept
ABSL_INTERNAL_CONSTEXPR_CLZ std::enable_if< std::is_unsigned< T >::value, T >::type bit_ceil(T x)
ABSL_ATTRIBUTE_ALWAYS_INLINE ABSL_INTERNAL_CONSTEXPR_POPCOUNT int Popcount(T x) noexcept
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:38