From d8a2698e6cee919db94b6b8200b562a5cefe0b6e Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 14 Apr 2023 09:49:07 -0700 Subject: [PATCH] Fix compilation as a C++20 module with gcc 13 --- include/fmt/compile.h | 2 +- include/fmt/format-inl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 38e02dfa..94e13c02 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -331,7 +331,7 @@ template struct parse_specs_result { int next_arg_id; }; -constexpr int manual_indexing_id = -1; +enum { manual_indexing_id = -1 }; template constexpr parse_specs_result parse_specs(basic_string_view str, diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index 2bda1c56..ba4b9564 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -195,7 +195,7 @@ inline int floor_log10_pow2_minus_log10_4_over_3(int e) noexcept { return (e * 631305 - 261663) >> 21; } -static constexpr struct { +FMT_INLINE_VARIABLE constexpr struct { uint32_t divisor; int shift_amount; } div_small_pow10_infos[] = {{10, 16}, {100, 16}};