-
Notifications
You must be signed in to change notification settings - Fork 100
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
RFC: Add a zero constant to quantities based on primitive types. #250
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for the PR! I didn't intend to do a full review yesterday morning and completely forgot to thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor things and I think we're good to merge.
Thoughts about the proposed new_in_base_units
. Just push that into the const fn issue or create a new issue?
I think a new issue is the better approach because our goal should probably be to have |
Thanks so much for this PR. I'll create a new issue to continue efforts for |
The public helper trait is a bit cumbersome but it appears to be the most straight-forward way to construct a zero value in const context.
An alternative that avoid the intermediate trait this would be to implement something like
for the same set of primitive types.
Fixes #26