Closed agrover closed 8 years ago
oops, wrong repo.
nope, right repo after all :-)
Zero
is an unstable trait, so it would probably have to go behind a feature gate. It's a shame we can't gate code based on individual language features...
Ord
, on the other hand, can already be derived directly. How is the standard compiler support not sufficient?
Hah, yes, Ord
derives fine, error on my part.
In that case, I'll close this since I added macros for One
and Zero
. Since they're unstable, they're behind a feature flag.
I'm finding I need to implement Zero, so I can call sum() on an iterator of T.
I'm also finding I need to implement Ord in order to sort a vec of T.
Could both of these have macros to derive their implementations?