From 9bfb053bf2285d0c621e639c3f8b41f3e69f3b96 Mon Sep 17 00:00:00 2001 From: Isaac Garzon Date: Thu, 14 Jul 2022 13:55:56 +0300 Subject: [PATCH] mutable_db_options: fix a Clang 14 build error (#57) Clang 14 fails to compile with the following error: ``` options/db_options.h:120:21: error: definition of implicit copy constructor for 'MutableDBOptions' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy] MutableDBOptions& operator=(const MutableDBOptions&) = default; ^ db/compaction/compaction_job.cc:439:7: note: in implicit copy constructor for 'rocksdb::MutableDBOptions' first required here mutable_db_options_copy_(mutable_db_options), ^ ``` Fix it by adding an explicit copy constructor. --- options/db_options.h | 1 + 1 file changed, 1 insertion(+) diff --git a/options/db_options.h b/options/db_options.h index 4c2589a735..433c7473b6 100644 --- a/options/db_options.h +++ b/options/db_options.h @@ -115,6 +115,7 @@ struct ImmutableDBOptions { struct MutableDBOptions { static const char* kName() { return "MutableDBOptions"; } MutableDBOptions(); + MutableDBOptions(const MutableDBOptions&) = default; explicit MutableDBOptions(const DBOptions& options); MutableDBOptions& operator=(const MutableDBOptions&) = default;