From 30068ac4740a54c8b30a183d9298eff92724e242 Mon Sep 17 00:00:00 2001 From: Vasily Nemkov Date: Wed, 15 Feb 2023 13:37:04 +0400 Subject: [PATCH] Fixed deprecation warning Client's that do not even call any deprecated APIs were getting warning/error: 'backward_compatibility_lowcardinality_as_wrapped_column' is deprecated --- clickhouse/client.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clickhouse/client.h b/clickhouse/client.h index 854fd70c..63177313 100644 --- a/clickhouse/client.h +++ b/clickhouse/client.h @@ -45,12 +45,13 @@ enum class CompressionMethod { }; struct ClientOptions { + // Setter goes first, so it is possible to apply 'deprecated' annotation safely. #define DECLARE_FIELD(name, type, setter, default_value) \ - type name = default_value; \ inline auto & setter(const type& value) { \ name = value; \ return *this; \ - } + } \ + type name = default_value /// Hostname of the server. DECLARE_FIELD(host, std::string, SetHost, std::string());