diff --git a/include/spdlog/stopwatch.h b/include/spdlog/stopwatch.h index 5d1f2dc5..bea7b8a7 100644 --- a/include/spdlog/stopwatch.h +++ b/include/spdlog/stopwatch.h @@ -61,7 +61,7 @@ template<> struct formatter : formatter { template - auto format(const spdlog::stopwatch &sw, FormatContext &ctx) -> decltype(ctx.out()) + auto format(const spdlog::stopwatch &sw, FormatContext &ctx) const -> decltype(ctx.out()) { return formatter::format(sw.elapsed().count(), ctx); }