Patrick Williams | 8dd6848 | 2022-10-04 07:57:18 -0500 | [diff] [blame^] | 1 | From d7b8fafbc94405c20753fed569abd8878cccde89 Mon Sep 17 00:00:00 2001 |
| 2 | From: Felix Yan <felixonmars@archlinux.org> |
| 3 | Date: Fri, 19 Aug 2022 15:22:10 +0300 |
| 4 | Subject: [PATCH] Fix build with fmt 9.0 |
| 5 | |
| 6 | Fixes #2681 |
| 7 | --- |
| 8 | src/database/sql_format.h | 4 ++-- |
| 9 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 10 | |
| 11 | diff --git a/src/database/sql_format.h b/src/database/sql_format.h |
| 12 | index 32dc00ef..e4e1909a 100644 |
| 13 | --- a/src/database/sql_format.h |
| 14 | +++ b/src/database/sql_format.h |
| 15 | @@ -42,7 +42,7 @@ struct SQLIdentifier { |
| 16 | template <> |
| 17 | struct fmt::formatter<SQLIdentifier> : formatter<std::string_view> { |
| 18 | template <typename FormatContext> |
| 19 | - auto format(const SQLIdentifier& tn, FormatContext& ctx) -> decltype(ctx.out()) |
| 20 | + auto format(const SQLIdentifier& tn, FormatContext& ctx) const -> decltype(ctx.out()) |
| 21 | { |
| 22 | return format_to(ctx.out(), "{}{}{}", tn.quote_begin, tn.name, tn.quote_end); |
| 23 | } |
| 24 | @@ -61,7 +61,7 @@ struct ColumnUpdate { |
| 25 | template <> |
| 26 | struct fmt::formatter<ColumnUpdate> : formatter<std::string_view> { |
| 27 | template <typename FormatContext> |
| 28 | - auto format(const ColumnUpdate& a, FormatContext& ctx) -> decltype(ctx.out()) |
| 29 | + auto format(const ColumnUpdate& a, FormatContext& ctx) const -> decltype(ctx.out()) |
| 30 | { |
| 31 | return format_to(ctx.out(), "{} = {}", a.column, a.value); |
| 32 | } |
| 33 | -- |
| 34 | 2.38.0.rc1.362.ged0d419d3c-goog |
| 35 | |