diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index d68e81489ceb..4b9aeeb1e0b5 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');