-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Tracking Issue for const_ops #90080
Comments
Tests need to be implemented for this, I think the files I should be able to implement them in a week or two, once I can find the time to. |
FYI: Besides |
Any updates or blockers for this feature? Would love to be able to use these in my projects. |
I was originally planning to make tests, but I don't think that making any would be useful as it doesn't add any new functionality, and it relies on arithmetic already working in const. Assuming tests aren't needed, the only other thing would be checking that it's ok to make this trait const. There was some debate when this PR was first made, I'm not sure what the policy is around const traits now. |
Hey, sorry to revive this, checking in on any potential updates/blockers. I tried converting some const functions which used |
Misclick! I can't think of any blockers, since const-ifying these operations doesn't necessitate tests when it uses already-const arithmetic. It would be good to consult with somebody who can stabilize it, to get their thoughts |
What needs to be done to stabilize this? I'm looking to use this in tests. Willing to contribute tests, add docs if necessary, but let me know so we can land this. |
This got entirely removed in #110393. |
Feature gate:
#![feature(const_ops)]
This is a tracking issue for
const_ops
, which adds const versions of common numeric operations instd::ops
.Public API
NonZero
BitOr
BitOrAssign
Div
Rem
Wrapping
Shl
Shr
ShlAssign
ShrAssign
Add
AddAssign
Sub
SubAssign
Mul
MulAssign
Div
DivAssign
Rem
RemAssign
Not
BitXor
BitXorAssign
BitOr
BitOrAssign
BitAnd
BitAndAssign
Neg
u*
/i*
Add
Sub
Mul
Div
Rem
Neg
AddAssign
SubAssign
MulAssign
DivAssign
RemAssign
Not
BitAnd
BitOr
BitXor
Shl
Shr
BitAndAssign
BitOrAssign
BitXorAssign
ShlAssign
ShrAssign
Steps / History
Unresolved Questions
The text was updated successfully, but these errors were encountered: