diff --git a/include/fmt/base.h b/include/fmt/base.h index ee3c79f3..4df7715b 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -456,7 +456,7 @@ template auto convert_for_visit(T) -> monostate { return {}; } # define FMT_USE_BITINT (FMT_CLANG_VERSION >= 1400) #endif -template struct bitint_traits {}; +template struct bitint_traits {}; #if FMT_USE_BITINT # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wbit-int-extension" @@ -1531,14 +1531,12 @@ template struct arg_mapper { FMT_MAP_API auto map(double val) -> double { return val; } FMT_MAP_API auto map(long double val) -> long double { return val; } - template >::is_formattable)> - FMT_MAP_API auto map(T&& val) -> decltype(val) { + template ::is_formattable)> + FMT_MAP_API auto map(T val) -> typename bitint_traits::format_type { return val; } - template >::is_formattable)> - FMT_MAP_API auto map(T&&) -> unformattable { + template ::is_formattable)> + FMT_MAP_API auto map(T) -> unformattable { return {}; }