From 3cd06a3d40cd9054cbc997fe6e28c5a472b93b8c Mon Sep 17 00:00:00 2001 From: gabime Date: Tue, 4 Jul 2023 16:04:49 +0300 Subject: [PATCH] Added const qualifier to stopwatch formatter to support c++20 --- include/spdlog/stopwatch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }