Tiny changes needed for building with c++23 support#4013
Merged
rocallahan merged 5 commits intorr-debugger:masterfrom Aug 29, 2025
Merged
Tiny changes needed for building with c++23 support#4013rocallahan merged 5 commits intorr-debugger:masterfrom
rocallahan merged 5 commits intorr-debugger:masterfrom
Conversation
https://en.cppreference.com/w/cpp/language/operator_incdec.html#Built-in_prefix_operators see rr-debugger#1 (and 2, but for our case it's ++ operator)
Implicitly capturing this via default [=] has been deprecated. And I don't see why & isn't used in the first place, as we're not actually wanting to capture anything by value here. https://en.cppreference.com/w/cpp/language/lambda.html#Lambda_capture#:~:text=The%20implicit%20capture%20of
We silence this issue by converting explicitly. For the list of compilers having implemented it: https://en.cppreference.com/w/cpp/compiler_support.html#:~:text=P2864R2 The proposal: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2864r2.pdf
d3499dc to
c83e1e6
Compare
Changes the CMake so that we can configure what c++ version we want to build with instead of hardcoding -std=c++17. The part about turning off extensions, is because without it, rr is compiled with -std=gnu++17/20/23, instead of -std=c++17/... which would not match the previous hard coding. If a user tries configuring with anything lower than c++17, it will fail at configuration time, instead of at build time.
c83e1e6 to
4c267c3
Compare
Collaborator
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I know > c++17 is not officially supported by rr, but these changes do not change behavior in any way, so I figured it'd be nice to make it possible to just drop rr into a c++23 setting and it building with no issues.
Also added some minor const thing.