diff --git a/include/fmt/core.h b/include/fmt/core.h index 2dc6ed55..cb7f6185 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -824,8 +824,8 @@ template struct arg_mapper { FMT_ENABLE_IF(std::is_enum::value && !has_formatter::value && !has_fallback_formatter::value)> - FMT_CONSTEXPR int map(const T& val) { - return static_cast(val); + FMT_CONSTEXPR auto map(const T& val) -> decltype(map(static_cast::type>(val))) { + return map(static_cast::type>(val)); } template ::value && !is_char::value &&