More C++ standard version change on build #4025
Merged
+6
−8
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.
DynamicType
testsIf we migrate to C++20 today, a fair estimate is that we will migrate to C++23 in three years. Thanks to @xwang233's effort, we already have an internal clang build pipeline for C++20, so I am changing the public pipeline in GitHub actions to use C++23 so we start get signals. I would be curious to see the readiness of compilers for C++23, would it just work? Or would it fail often?
To be clear, I do not want to waste people's time to fight for compiler bugs. So if this C++23 build is failing due to compiler reasons, my expectation is people will just leave it in the failing state, instead of writing workarounds to make it work. On the other hand, C++20 -> C++23 is a much smaller upgrade compared to C++17 -> C++20, so I would expect it to be much smoother.
Over time, I would expect we will gradually have more and more pipelines running on C++23, if we are collecting good signals that compilers are stable enough. I see this as a three year process. The target date in my mind for formal switch to C++23 is the release date of Ubuntu 28.04 LTS, but in practice we can decide to do it earlier or later depending on the signal we get. Reference dates are: Ubuntu 22.04 LTS's standard support will end in Apr 2027, Ubuntu 24.04 LTS's standard support will end in Apr 2029. These reference date could be the date of change if we want to do it earlier or later.