From d2204a8a14343b402783c3ccc1ba7331dbcaa4b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Thu, 30 Nov 2023 12:42:28 -0500 Subject: [PATCH] fixup! Added formatter for std::source_location Removed template parameter --- include/fmt/std.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/include/fmt/std.h b/include/fmt/std.h index 91f09f9a..f97e97c9 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -235,9 +235,8 @@ FMT_END_NAMESPACE #ifdef __cpp_lib_source_location FMT_BEGIN_NAMESPACE FMT_EXPORT -template -struct formatter::value>> { +template<> +struct formatter { template FMT_CONSTEXPR auto parse(ParseContext& ctx) { return ctx.begin(); } @@ -246,13 +245,13 @@ struct formatter decltype(ctx.out()) { auto out = ctx.out(); - out = detail::write_bytes(out, loc.file_name(), format_specs()); - out = detail::write(out, Char(':')); - out = detail::write(out, loc.line()); - out = detail::write(out, Char(':')); - out = detail::write(out, loc.column()); - out = detail::write(out, ": "); - out = detail::write(out, loc.function_name()); + out = detail::write_bytes(out, loc.file_name(), format_specs()); + out = detail::write(out, ':'); + out = detail::write(out, loc.line()); + out = detail::write(out, ':'); + out = detail::write(out, loc.column()); + out = detail::write(out, ": "); + out = detail::write(out, loc.function_name()); return out; } };