Skip to content

Commit

Permalink
C++20 compatibility (#6697)
Browse files Browse the repository at this point in the history
Summary:
Based on facebook/rocksdb#6648 (CLA Signed), but heavily modified / extended:

* Implicit capture of this via [=] deprecated in C++20, and [=,this] not standard before C++20 -> now using explicit capture lists
* Implicit copy operator deprecated in gcc 9 -> add explicit '= default' definition
* std::random_shuffle deprecated in C++17 and removed in C++20 -> migrated to a replacement in RocksDB random.h API
* Add the ability to build with different std version though -DCMAKE_CXX_STANDARD=11/14/17/20 on the cmake command line
* Minimal rebuild flag of MSVC is deprecated and is forbidden with /std:c++latest (C++20)
* Added MSVC 2019 C++11 & MSVC 2019 C++20 in AppVeyor
* Added GCC 9 C++11 & GCC9 C++20 in Travis
Pull Request resolved: facebook/rocksdb#6697

Test Plan: make check and CI

Reviewed By: cheng-chang

Differential Revision: D21020318

Pulled By: pdillinger

fbshipit-source-id: 12311be5dbd8675a0e2c817f7ec50fa11c18ab91
Signed-off-by: Changlong Chen <levisonchen@live.cn>
  • Loading branch information
pdillinger authored and Changlong Chen committed Jun 24, 2021
1 parent 8ce69ec commit 57d7528
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/rocksdb/file_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ struct FileOptions : EnvOptions {

FileOptions(const FileOptions& opts)
: EnvOptions(opts), io_options(opts.io_options) {}

FileOptions& operator=(const FileOptions& opts) = default;
};

// A structure to pass back some debugging information from the FileSystem
Expand Down

0 comments on commit 57d7528

Please sign in to comment.