-
-
Notifications
You must be signed in to change notification settings - Fork 22.8k
[3.x] Bump to c++17 #107847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.x] Bump to c++17 #107847
Conversation
Yeah I have a WIP PR already, I'll make it draft : #107851 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good from my side, though we should still get build system feedback :)
On thing that is interesting is that the WIP PR for checking the compiler versions (which corresponds to 4.x with c++17) is flagging one of the compilers as being old, so maybe is a little out of date for c++17 for some features. But we can discuss changing that on #107844. I'm happy either going ahead here or waiting till we decide on that, just as long as we can start using UPDATE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This barely scratches the surface of what potentially changed with C++17, but I also don't think this PR was meant to delve into that either. In terms of pure functionality, this is technically all you need… With the caveat that several followup PRs are a certainty.
As discussed, we want to upgrade to c++17 for a few new bits of super useful functionality, especially
if constexpr
.I have a later PR for adding some of the compiler requirements we have in 4.x (in
SConstruct
) but hopefully this should be okay to get started.Notes
if constexpr
is particularly useful for compile time branching, may be useful in [3.x] OptimizeObject::cast_to
with ancestral classes when possible #107844 and in a number of cases where we are starting to heavily optimize internal core.