mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 09:28:21 +00:00
parent
ba6f89c76e
commit
0a24a0714e
@ -991,7 +991,7 @@ FMT_CONSTEXPR20 inline auto count_digits(uint64_t n) -> int {
|
||||
template <int BITS, typename UInt>
|
||||
FMT_CONSTEXPR auto count_digits(UInt n) -> int {
|
||||
#ifdef FMT_BUILTIN_CLZ
|
||||
if (num_bits<UInt>() == 32)
|
||||
if (!is_constant_evaluated() && num_bits<UInt>() == 32)
|
||||
return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1;
|
||||
#endif
|
||||
// Lambda avoids unreachable code warnings from NVHPC.
|
||||
|
Loading…
Reference in New Issue
Block a user