Skip to content

Commit

Permalink
mutable_db_options: fix a Clang 14 build error (#57)
Browse files Browse the repository at this point in the history
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),
      ^
```

This is caused by the introduction of an assignment operator in #7 due to
a diagnostic emitted by Clang 13 which isn't emitted by Clang 14, so this
was probably a compiler bug, and we just need to remove the assignment
operator.
  • Loading branch information
isaac-io committed Jul 18, 2022
1 parent bc23e15 commit d78228d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions options/db_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ struct MutableDBOptions {
MutableDBOptions();
explicit MutableDBOptions(const DBOptions& options);

MutableDBOptions& operator=(const MutableDBOptions&) = default;

void Dump(Logger* log) const;

int max_background_jobs;
Expand Down

0 comments on commit d78228d

Please sign in to comment.