From 2d445775865d8ef5b62e7d526657e1b6efae41e8 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 18 Dec 2021 08:51:21 -0800 Subject: [PATCH] Try fixing byte regression --- include/fmt/core.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 696b8676..5acd9923 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1415,17 +1415,20 @@ template struct arg_mapper { } template ::value && - (std::is_convertible::value || - std::is_same::value) && - !has_formatter::value && - !has_fallback_formatter::value)> + FMT_ENABLE_IF( + std::is_enum::value&& std::is_convertible::value && + !has_formatter::value && + !has_fallback_formatter::value)> FMT_CONSTEXPR FMT_INLINE auto map(const T& val) -> decltype(std::declval().map( static_cast::type>(val))) { return map(static_cast::type>(val)); } + FMT_CONSTEXPR FMT_INLINE auto map(detail::byte val) -> unsigned char { + return map(static_cast(val)); + } + template > struct formattable : bool_constant() ||