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 <kefu.chai@scylladb.com>
This commit is contained in:
Kefu Chai
2023-02-14 18:15:35 +08:00
parent 310638e84d
commit f36fdff622

View File

@@ -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;