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)); }