rust-num / num-traits

Numeric traits for generic mathematics in Rust
Apache License 2.0
731 stars 135 forks source link

Zero/One not implemented for smart pointer types (Cell<T>, Rc<T>, Box<T>, ...) #89

Closed Luthaf closed 6 years ago

Luthaf commented 6 years ago

Is there any reason why Zero is not implemented for std::cell::Cell<T: Zero> ? And same for One and other "smart pointer" types (I checked for Cell, RefCell, Rc, Arc, and Box).

Luthaf commented 6 years ago

OK, after a bit more checking, it appears that it it because of the Zero: Add requirement.

Sorry for the noise !