diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index 690ca261..c4e03041 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -818,11 +818,11 @@ struct uint128_wrapper { }; // Compilers should be able to optimize this into the ror instruction. -inline uint32_t rotr(uint32_t n, uint32_t r) noexcept { +FMT_CONSTEXPR inline uint32_t rotr(uint32_t n, uint32_t r) noexcept { r &= 31; return (n >> r) | (n << (32 - r)); } -inline uint64_t rotr(uint64_t n, uint32_t r) noexcept { +FMT_CONSTEXPR inline uint64_t rotr(uint64_t n, uint32_t r) noexcept { r &= 63; return (n >> r) | (n << (64 - r)); }