Added const qualifier to stopwatch formatter to support c++20

This commit is contained in:
gabime 2023-07-04 16:04:49 +03:00
parent c3fa8f60e2
commit 3cd06a3d40

View File

@ -61,7 +61,7 @@ template<>
struct formatter<spdlog::stopwatch> : formatter<double>
{
template<typename FormatContext>
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<double>::format(sw.elapsed().count(), ctx);
}