mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-08 12:20:06 +00:00
Suppress a bogus gcc warning
This commit is contained in:
parent
70b6a6fa44
commit
ef55d4f52e
@ -1541,8 +1541,7 @@ constexpr auto encode_types() -> unsigned long long {
|
||||
|
||||
template <bool PACKED, typename Context, typename T, FMT_ENABLE_IF(PACKED)>
|
||||
FMT_CONSTEXPR FMT_INLINE auto make_arg(T& val) -> value<Context> {
|
||||
auto&& arg = arg_mapper<Context>().map(val);
|
||||
using arg_type = remove_cvref_t<decltype(arg)>;
|
||||
using arg_type = remove_cvref_t<decltype(arg_mapper<Context>().map(val))>;
|
||||
|
||||
constexpr bool formattable_char =
|
||||
!std::is_same<arg_type, unformattable_char>::value;
|
||||
@ -1561,7 +1560,7 @@ FMT_CONSTEXPR FMT_INLINE auto make_arg(T& val) -> value<Context> {
|
||||
formattable,
|
||||
"Cannot format an argument. To make type T formattable provide a "
|
||||
"formatter<T> specialization: https://fmt.dev/latest/api.html#udt");
|
||||
return {arg};
|
||||
return {arg_mapper<Context>().map(val)};
|
||||
}
|
||||
|
||||
template <typename Context, typename T>
|
||||
|
Loading…
Reference in New Issue
Block a user