build: Make C++17 be the default (C++14 is still the minimum for now) #4022
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is for master only! Will not be backported to any release branch.
We are assuming the 2.5 release family will be the last to support C++14, and the next year's 2.6 family will raise the minimum to C++17. We're not ready to throw that switch yet, but as an intermediate step, let's raise the default level to C++17. It's still possible to compile for C++14, but to do so, one must proactively
-DCMAKE_CXX_STANDARD=14
.This has two benefits:
The majority of people who are already using a C++17-capable compiler will take advantage of those features by default, instead of needlessly restricting to C++14.
The people using a compiler that tops out at C++14 (e.g., gcc 6.3) are going to have to set
-DCMAKE_CXX_STANDARD=14
, thus making them aware that (in master anyway) they're swimming against the current and have a limited time in which that will continue to work.I hope that some time around the new year, we'll be able to fully raise the minimum to 17? But it's going to depend on my place and other major users finally retiring the DCC versions that require a gcc6/C++14 ecosystem, and we're not quite ready to do that at this moment. Soon, soon.