From 43d93815b5ffdafb3a0938ab472627aa964e761e Mon Sep 17 00:00:00 2001 From: Junekey Jeon Date: Wed, 11 Jan 2023 18:41:56 -0800 Subject: [PATCH] static variables are not allowed in constexpr functions --- include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index fc5ddb52..92bd5a66 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -3510,7 +3510,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs, // For checking rounding thresholds. // The kth entry is chosen to be the smallest integer such that the // upper 32-bits of 10^(k+1) times it is strictly bigger than 5 * 10^k. - static constexpr uint32_t fractional_part_rounding_thresholds[8] = { + static const uint32_t fractional_part_rounding_thresholds[8] = { 2576980378, // ceil(2^31 + 2^32/10^1) 2190433321, // ceil(2^31 + 2^32/10^2) 2151778616, // ceil(2^31 + 2^32/10^3)