diff --git a/include/mtxclient/http/errors.hpp b/include/mtxclient/http/errors.hpp index 2d0e7a45..b99ff90e 100644 --- a/include/mtxclient/http/errors.hpp +++ b/include/mtxclient/http/errors.hpp @@ -87,7 +87,7 @@ struct fmt::formatter // Formats the point p using the parsed format specification (presentation) // stored in this formatter. template - auto format(const mtx::http::ClientError &e, FormatContext &ctx) -> decltype(ctx.out()) + auto format(const mtx::http::ClientError &e, FormatContext &ctx) const -> decltype(ctx.out()) { // ctx.out() is an output iterator to write to. bool prepend_comma = false; @@ -132,7 +132,7 @@ struct fmt::formatter> : formatter. template - auto format(std::optional c, FormatContext &ctx) + auto format(std::optional c, FormatContext &ctx) const { if (!c) return fmt::format_to(ctx.out(), "(no error)");