mirror of
https://github.com/fmtlib/fmt.git
synced 2025-03-31 07:20:53 +00:00
Minor cleanup
This commit is contained in:
parent
3541353512
commit
f97deb0d7d
@ -3969,9 +3969,8 @@ struct formatter<T, Char, enable_if_t<detail::has_format_as<T>::value>>
|
|||||||
: formatter<detail::format_as_t<T>, Char> {
|
: formatter<detail::format_as_t<T>, Char> {
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const T& value, FormatContext& ctx) const -> decltype(ctx.out()) {
|
auto format(const T& value, FormatContext& ctx) const -> decltype(ctx.out()) {
|
||||||
using base = formatter<detail::format_as_t<T>, Char>;
|
|
||||||
auto&& val = format_as(value); // Make an lvalue reference for format.
|
auto&& val = format_as(value); // Make an lvalue reference for format.
|
||||||
return base::format(val, ctx);
|
return formatter<detail::format_as_t<T>, Char>::format(val, ctx);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3980,8 +3979,7 @@ struct formatter<T, Char, enable_if_t<detail::has_format_as<T>::value>>
|
|||||||
struct formatter<Type, Char> : formatter<Base, Char> { \
|
struct formatter<Type, Char> : formatter<Base, Char> { \
|
||||||
template <typename FormatContext> \
|
template <typename FormatContext> \
|
||||||
auto format(Type value, FormatContext& ctx) const -> decltype(ctx.out()) { \
|
auto format(Type value, FormatContext& ctx) const -> decltype(ctx.out()) { \
|
||||||
using base = formatter<Base, Char>; \
|
return formatter<Base, Char>::format(value, ctx); \
|
||||||
return base::format(value, ctx); \
|
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user