std::num::Checked{Add,Sub,Mul,Div}
should have type parameters
#59
Labels
Milestone
std::num::Checked{Add,Sub,Mul,Div}
should have type parameters
#59
Issue by lifthrasiir
Monday Apr 14, 2014 at 12:33 GMT
For earlier discussion, see rust-lang/rust#13510
This issue was labelled with: A-libs in the Rust repository
The corresponding
std::ops
traits have both the type of right hand side operand and the type of result, whileChecked*
traits do not (and always assume that both operands and result have the same type). There is no real reason to makeChecked*
traits behave differently fromstd::ops
traits, and having them as is hampers advanced uses of operator overloading: for example, if the scalar type (e.g.DateTime
) and difference type (e.g.Duration
) are distinct from each other then the current scheme wouldn't work at all.The text was updated successfully, but these errors were encountered: