diff options
Diffstat (limited to 'absl/numeric/bits_test.cc')
-rw-r--r-- | absl/numeric/bits_test.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/absl/numeric/bits_test.cc b/absl/numeric/bits_test.cc index 8bf7bc9f..7c942aae 100644 --- a/absl/numeric/bits_test.cc +++ b/absl/numeric/bits_test.cc @@ -560,6 +560,14 @@ TEST(IntegralPowersOfTwo, Width) { } } +// On GCC and Clang, anticiapte that implementations will be constexpr +#if defined(__GNUC__) +static_assert(ABSL_INTERNAL_HAS_CONSTEXPR_POPCOUNT, + "popcount should be constexpr"); +static_assert(ABSL_INTERNAL_HAS_CONSTEXPR_CLZ, "clz should be constexpr"); +static_assert(ABSL_INTERNAL_HAS_CONSTEXPR_CTZ, "ctz should be constexpr"); +#endif + } // namespace ABSL_NAMESPACE_END } // namespace absl |