Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a conversion operator to std::string for podio::version::Version #384

Merged
merged 2 commits into from
Mar 6, 2023

Conversation

veprbl
Copy link
Contributor

@veprbl veprbl commented Mar 2, 2023

BEGINRELEASENOTES

  • Added an operator for conversion to std::string for podio::version::Version

ENDRELEASENOTES

@tmadlener
Copy link
Collaborator

Can we make this an explicit operator? I am not the biggest fan of implicit conversions, and in this case the difference for users would be acceptable IMHO.

const auto versionStr = std::string(version);

rather then

const std::string versionStr = version;

Unless you have a specific use case this would fix where the explicit cast would be too cumbersome?

@veprbl veprbl changed the title Add implicit conversion to std::string for podio::version::Version Add a conversion operator to std::string for podio::version::Version Mar 4, 2023
@veprbl
Copy link
Contributor Author

veprbl commented Mar 4, 2023

I also prefer the explicit conversion, but it's not so popular in C++ world.

@tmadlener tmadlener merged commit ada8443 into AIDASoft:master Mar 6, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants