From 8ee89546ffcf046309d1f0d38c0393f02fde56c8 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 10 Sep 2024 21:06:25 -0700 Subject: [PATCH] Remove old workaround --- include/fmt/format.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 2a1fb1b9..bd92d46e 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1195,11 +1195,7 @@ inline auto digits2(size_t value) -> const char* { return &data[value * 2]; } -// Sign is a template parameter to workaround a bug in gcc 4.8. -template constexpr auto getsign(Sign s) -> Char { -#if !FMT_GCC_VERSION || FMT_GCC_VERSION >= 604 - static_assert(std::is_same::value, ""); -#endif +template constexpr auto getsign(sign s) -> Char { return static_cast(((' ' << 24) | ('+' << 16) | ('-' << 8)) >> (static_cast(s) * 8)); }