aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2024-09-20 16:53:00 +0200
committerGitHub Enterprise <[email protected]>2024-09-20 16:53:00 +0200
commitc8189d26a2e1d57d1ce227b02796276337fba5ca (patch)
tree5b2d235a91a793878ab739d987f671fc8d6fe3f5 /src
parent5.5.8-pre0 (diff)
downloadzen-c8189d26a2e1d57d1ce227b02796276337fba5ca.tar.xz
zen-c8189d26a2e1d57d1ce227b02796276337fba5ca.zip
made fmt formatter format function const (#162)
this appears to be required as of fmt v11
Diffstat (limited to 'src')
-rw-r--r--src/zencore/include/zencore/fmtutils.h8
-rw-r--r--src/zenhttp/include/zenhttp/formatters.h4
-rw-r--r--src/zenstore/include/zenstore/gc.h2
-rw-r--r--src/zenutil/include/zenutil/cache/cache.h2
4 files changed, 8 insertions, 8 deletions
diff --git a/src/zencore/include/zencore/fmtutils.h b/src/zencore/include/zencore/fmtutils.h
index 9c5bdae66..8482157fb 100644
--- a/src/zencore/include/zencore/fmtutils.h
+++ b/src/zencore/include/zencore/fmtutils.h
@@ -40,7 +40,7 @@ template<>
struct fmt::formatter<zen::IoHash> : formatter<string_view>
{
template<typename FormatContext>
- auto format(const zen::IoHash& Hash, FormatContext& ctx)
+ auto format(const zen::IoHash& Hash, FormatContext& ctx) const
{
zen::IoHash::String_t String;
Hash.ToHexString(String);
@@ -52,7 +52,7 @@ template<>
struct fmt::formatter<zen::Oid> : formatter<string_view>
{
template<typename FormatContext>
- auto format(const zen::Oid& Id, FormatContext& ctx)
+ auto format(const zen::Oid& Id, FormatContext& ctx) const
{
zen::StringBuilder<32> String;
Id.ToString(String);
@@ -64,7 +64,7 @@ template<>
struct fmt::formatter<zen::Guid> : formatter<string_view>
{
template<typename FormatContext>
- auto format(const zen::Guid& Id, FormatContext& ctx)
+ auto format(const zen::Guid& Id, FormatContext& ctx) const
{
zen::StringBuilder<48> String;
Id.ToString(String);
@@ -76,7 +76,7 @@ template<>
struct fmt::formatter<std::filesystem::path> : formatter<string_view>
{
template<typename FormatContext>
- auto format(const std::filesystem::path& Path, FormatContext& ctx)
+ auto format(const std::filesystem::path& Path, FormatContext& ctx) const
{
using namespace std::literals;
diff --git a/src/zenhttp/include/zenhttp/formatters.h b/src/zenhttp/include/zenhttp/formatters.h
index d45f5fbb2..538136238 100644
--- a/src/zenhttp/include/zenhttp/formatters.h
+++ b/src/zenhttp/include/zenhttp/formatters.h
@@ -19,7 +19,7 @@ struct fmt::formatter<cpr::Response>
constexpr auto parse(format_parse_context& Ctx) -> decltype(Ctx.begin()) { return Ctx.end(); }
template<typename FormatContext>
- auto format(const cpr::Response& Response, FormatContext& Ctx) -> decltype(Ctx.out())
+ auto format(const cpr::Response& Response, FormatContext& Ctx) const -> decltype(Ctx.out())
{
using namespace std::literals;
@@ -77,7 +77,7 @@ struct fmt::formatter<zen::HttpClient::Response>
constexpr auto parse(format_parse_context& Ctx) -> decltype(Ctx.begin()) { return Ctx.end(); }
template<typename FormatContext>
- auto format(const zen::HttpClient::Response& Response, FormatContext& Ctx) -> decltype(Ctx.out())
+ auto format(const zen::HttpClient::Response& Response, FormatContext& Ctx) const -> decltype(Ctx.out())
{
using namespace std::literals;
diff --git a/src/zenstore/include/zenstore/gc.h b/src/zenstore/include/zenstore/gc.h
index 111b9886e..a8c5c0219 100644
--- a/src/zenstore/include/zenstore/gc.h
+++ b/src/zenstore/include/zenstore/gc.h
@@ -591,7 +591,7 @@ template<>
struct fmt::formatter<zen::GcClock::TimePoint> : formatter<string_view>
{
template<typename FormatContext>
- auto format(const zen::GcClock::TimePoint& TimePoint, FormatContext& ctx)
+ auto format(const zen::GcClock::TimePoint& TimePoint, FormatContext& ctx) const
{
std::time_t Time = std::chrono::system_clock::to_time_t(TimePoint);
char TimeString[std::size("yyyy-mm-ddThh:mm:ss")];
diff --git a/src/zenutil/include/zenutil/cache/cache.h b/src/zenutil/include/zenutil/cache/cache.h
index 5e12c488c..20299a667 100644
--- a/src/zenutil/include/zenutil/cache/cache.h
+++ b/src/zenutil/include/zenutil/cache/cache.h
@@ -23,7 +23,7 @@ template<>
struct fmt::formatter<zen::CacheRequestContext> : formatter<string_view>
{
template<typename FormatContext>
- auto format(const zen::CacheRequestContext& Context, FormatContext& ctx)
+ auto format(const zen::CacheRequestContext& Context, FormatContext& ctx) const
{
zen::ExtendableStringBuilder<64> String;
Context.SessionId.ToString(String);