Skip to content

Commit 2a4d9fc

Browse files
authored
Merge pull request #285 from Enmk/fix_deprecated_warning
Fixed deprecation warning
2 parents 9cf39ca + 30068ac commit 2a4d9fc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clickhouse/client.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ enum class CompressionMethod {
4545
};
4646

4747
struct ClientOptions {
48+
// Setter goes first, so it is possible to apply 'deprecated' annotation safely.
4849
#define DECLARE_FIELD(name, type, setter, default_value) \
49-
type name = default_value; \
5050
inline auto & setter(const type& value) { \
5151
name = value; \
5252
return *this; \
53-
}
53+
} \
54+
type name = default_value
5455

5556
/// Hostname of the server.
5657
DECLARE_FIELD(host, std::string, SetHost, std::string());

0 commit comments

Comments
 (0)