UPDATE: Release plan summary from April 2nd, 2020 meeting:
C++11 Compat | C++17 Compat | Gitian/Guix Release | |
---|---|---|---|
v0.20 | :heavy_check_mark: | if easy | C++11 |
v0.21 | :heavy_check_mark: | :heavy_check_mark: | C++17 |
v0.22 | :x: | :heavy_check_mark: | C++17 |
Meeting logs can be found here: http://www.erisian.com.au/meetbot/bitcoin-core-dev/2020/bitcoin-core-dev.2020-04-02-19.01.log.html
There were some discussion around upgrading to C++17. It seems to be able to give us library and language features that will simplify future code. For example, for library features, our current @elichai has kindly provided a table summarizing features useful for Bitcoin Core here: #16684 (comment).optional.h
is just a wrapper around boost::optional
, and can be replaced with std::optional
. Other library features that might be useful include (non-exhaustively): std::variant
, the file system library, and std::shared_mutex
.
I want to apologize for misspeaking about C++17 requiring GCC8, that is untrue, and I believe all of the features we would want will be covered by GCC7, and some by GCC6.
For some background on the cons: #13356 (comment)
Default GCC versions major distros (as of Aug 22nd):
Operating System | release version | GCC version | Notes | |
---|---|---|---|---|
:heavy_check_mark: | Debian | Buster | 8.3 | |
:heavy_check_mark: | Ubuntu | 18.04 LTS | 7.4 | |
:heavy_check_mark: | Fedora | 30 | 9.1.1 | |
:heavy_check_mark: | RHEL | 8 | 8.2 | |
CentOS | 7 | 4.8.5 | CentOS 8 (GCC 8.2) is being released as we speak |
In-depth code examples of
C++17 features: https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP17.md C++14 features: https://github.com/AnthonyCalandra/modern-cpp-features/blob/master/CPP14.md
Here are some compatibility tables from https://en.cppreference.com/w/cpp/compiler_support#cpp17
Library features:
Language features: