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

Integrate checked arithmetics with equal precedence #106

Closed
philipp2100 opened this issue Dec 17, 2019 · 2 comments
Closed

Integrate checked arithmetics with equal precedence #106

philipp2100 opened this issue Dec 17, 2019 · 2 comments

Comments

@philipp2100
Copy link

You wrote recently that you don't want checked_arithmetic by default, since this is in the first instance a library for type safety. I understand that, and probably checked arithmetic on unsigned types might also introduce errors.
However, since safe arithmetics are a closely related and important issue, I think they should be available with equal precedence, e.g. to make use of the literal operators to get types with checked arithmetics. This should be a simple change, like creating a new macro TYPE_SAFE_ARITHMETIC_CHECKED.
If you want, I can make a PR.

@foonathan
Copy link
Owner

Fair enough, I'll merge a PR that modifies the type aliases (but not the template defaults).

@philipp2100
Copy link
Author

Great! :)

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

No branches or pull requests

2 participants