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

Remove C++17 compatibility in version header file #354

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

m-fila
Copy link
Contributor

@m-fila m-fila commented Aug 30, 2024

BEGINRELEASENOTES

  • Removed C++17 compatibility in version header file

ENDRELEASENOTES

Since #343 we removed compatibility with older versions of C++, this can also go as now we have the spaceship operator

Copy link
Member

@jmcarcell jmcarcell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we are at this file I think https://github.com/key4hep/EDM4hep/blob/main/EDM4hepVersion.h.in#L78 can be consteval.

@tmadlener
Copy link
Contributor

I am not sure if it makes sense to make the decode_version consteval. That would render it unusable in runtime contexts. But I am also not sure if we have actual use cases for that.

Copy link
Contributor

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Thanks :)

@jmcarcell
Copy link
Member

I am not sure if it makes sense to make the decode_version consteval. That would render it unusable in runtime contexts. But I am also not sure if we have actual use cases for that.

Yeah I'm not sure if there would be a case when the version would not be known at compile time, like reading it from a file...

@jmcarcell jmcarcell merged commit bd1ccb8 into key4hep:main Sep 2, 2024
8 of 10 checks passed
@m-fila m-fila deleted the c++20_in_edm4hep_version branch September 2, 2024 09:32
@tmadlener
Copy link
Contributor

I think if they are read from file, they will be split into major, minor, patch instead of being encoded into the 64 bit pre processor constant. I would leave it at constexpr for now (as we did with this PR).

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