feat: Use cpp20 by default#2839
Merged
JohanMabille merged 9 commits intoxtensor-stack:masterfrom Apr 9, 2025
Merged
Conversation
- Previously, we had the option of activating c++20. - But as we defined c++20 as default, I suggest to replace this option as c++23.
- Previously, tests was in c++17 - We want to add c++20 by default, so I modify the test cmake - The tests passed locally
- Previously, The MSVC version was not well recognized --> Hence, there was some bugy macro specific to MSVC/c++20 - This Commit resolve the issue and I am now able to compile the problematic testcase - Question : SHould we add this flag not at the tets level but at the main CMakeFiles level ?
- Previously, on MSVC, in c++20, the empty() function was incorrectly deduced - Hence the test_xbuilder no longer pass - I suggest enforce the right specialization by specifying the last template parameter
JohanMabille
approved these changes
Apr 9, 2025
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.
Checklist
Description
Previously,
xtensorusesc++17as default.Here is a PR that set
c++20by default.This PR also suggests modifying the compilation option
CPP20toCPP23.