From f36fdff62256fa6e38bb1ecff90257d38433deeb Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 14 Feb 2023 18:15:35 +0800 Subject: [PATCH] query-result: remove implicitly deleted copy ctor as one of the (indirect) member variables of `query::result` is not copyable, compiler refuses to create a copy ctor or an assignment operator for us, an Clang 17 warns at seeing this. so let's just drop them for better readability and more importantly to preserve the correctness. ``` /home/kefu/dev/scylladb/query-result.hh:385:5: warning: explicitly defaulted copy constructor is implicitly deleted [-Wdefaulted-function-deleted] result(const result&) = default; ^ /home/kefu/dev/scylladb/query-result.hh:321:34: note: copy constructor of 'result' is implicitly deleted because field '_memory_tracker' has a deleted copy constructor query::result_memory_tracker _memory_tracker; ^ /home/kefu/dev/scylladb/query-result.hh:97:23: note: copy constructor of 'result_memory_tracker' is implicitly deleted because field '_units' has a deleted copy constructor semaphore_units<> _units; ^ /home/kefu/dev/scylladb/seastar/include/seastar/core/semaphore.hh:500:5: note: 'semaphore_units' has been explicitly marked deleted here semaphore_units(const semaphore_units&) = delete; ^ ``` Signed-off-by: Kefu Chai --- query-result.hh | 2 -- 1 file changed, 2 deletions(-) diff --git a/query-result.hh b/query-result.hh index a6da0cb0e9..a86d92ed11 100644 --- a/query-result.hh +++ b/query-result.hh @@ -382,9 +382,7 @@ public: w.reduce_chunk_count(); } result(result&&) = default; - result(const result&) = default; result& operator=(result&&) = default; - result& operator=(const result&) = default; const bytes_ostream& buf() const { return _w;