Minor cleanup

This commit is contained in:
Victor Zverovich
2024-05-16 10:45:23 -07:00
parent 0b5287f8b7
commit 75e892420e
2 changed files with 9 additions and 10 deletions
+1 -2
View File
@@ -4000,8 +4000,7 @@ struct formatter<T, Char, enable_if_t<detail::has_format_as<T>::value>>
template <typename FormatContext>
auto format(const T& value, FormatContext& ctx) const -> decltype(ctx.out()) {
using base = formatter<detail::format_as_t<T>, Char>;
// format functions expect lvalue refs, not rvalues
auto&& val = format_as(value);
auto&& val = format_as(value); // Make an lvalue reference for format.
return base::format(val, ctx);
}
};