From 6c43c982b65c19114effd23ae19e22b54e4ae163 Mon Sep 17 00:00:00 2001 From: summivox Date: Wed, 27 Jan 2021 22:54:42 -0800 Subject: [PATCH] fix #2118: FMT_COMPILE did not work with tm formatter --- include/fmt/chrono.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index d68e81489ceba..4b9aeeb1e0b56 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -423,7 +423,8 @@ template struct formatter { } template - auto format(const std::tm& tm, FormatContext& ctx) -> decltype(ctx.out()) { + auto format(const std::tm& tm, FormatContext& ctx) const + -> decltype(ctx.out()) { basic_memory_buffer tm_format; tm_format.append(specs.begin(), specs.end()); tm_format.push_back('\0');