Skip to content
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

Upgrading to C++20 #3578

Merged
merged 47 commits into from
Jan 31, 2024
Merged

Upgrading to C++20 #3578

merged 47 commits into from
Jan 31, 2024

Conversation

lpugin
Copy link
Contributor

@lpugin lpugin commented Jan 24, 2024

No major changes beside:

  • Updating make files
  • Moving the LedgerLine definition up (before `Staff) because of one compiler complaining about it
  • Ajust the CI (remove unsupported OS / compiler combinations and add new ones)

If upgrading to C++20 is a problem, please speak up. It is not absolutely necessary to do this now, but at the same time there seems to be no reason no to do it.

@craigsapp
Copy link
Contributor

It should not be a problem for me.

On this page: https://developer.apple.com/xcode/cpp

The features supported by Xcode are listed.

One thing of note is that the referenced page says XCode 15 is required for many of the new C++20 features:

Screenshot 2024-01-24 at 09 30 32

And there is a fair amount of C++20 features that Xcode does not support yet (so don't use those).


Here are the C++20 features that GCC supports:

https://gcc.gnu.org/projects/cxx-status.html#cxx20

Of note:

Important: Because the ISO C++20 standard is very recent, GCC's support is experimental.

and a note about compiler flags in GCC:

C++20 features are available since GCC 8. To enable C++20 support, add the command-line parameter -std=c++20 (use -std=c++2a in GCC 9 and earlier) to your g++ command line. Or, to enable GNU extensions in addition to C++20 features, add -std=gnu++20.

But that should not be a problem since -std=c++20 should work in GCC 10 and higher.

GCC 11 is required for all implemented features (on my up-to-date linux I am using GCC 13) and a on slightly older version of linux I am using GCC 12.

@lpugin
Copy link
Contributor Author

lpugin commented Jan 24, 2024

Thanks for checking this. This is the status of the building tests on GH
https://github.com/rism-digital/verovio/actions/runs/7583048214

They all look fine. There is however one problem on Windows https://ci.appveyor.com/project/LaurentPugin/verovio-r1t6l/builds/49024120

@lpugin lpugin marked this pull request as draft January 24, 2024 18:18
@lpugin lpugin marked this pull request as ready for review January 25, 2024 16:33
@lpugin lpugin merged commit 6de14da into develop Jan 31, 2024
9 checks passed
@lpugin lpugin deleted the develop-c20 branch January 31, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants