num-traits icon indicating copy to clipboard operation
num-traits copied to clipboard

Add CheckedNumOps

Open cod10129 opened this issue 1 year ago • 2 comments

Working with numerics in num-traits is biased towards using the standard traits, which is generally good. However, checked arithmetic is lacking a unifying trait (like NumOps). This PR adds that. This trait should theoretically be a supertrait of PrimInt. However, this trait (like NumOps: Rem), requires CheckedRem. PrimInt does not currently require that, meaning that this would be a breaking change. (PrimInt: CheckedNumOps for a future release?)

cod10129 avatar Mar 26 '24 22:03 cod10129