Mixed int/BigInt foreach interval
Paul D. Anderson
paul.d.removethis.anderson at comcast.andthis.net
Mon Sep 26 13:47:20 PDT 2011
bearophile Wrote:
> Time ago I've asked to use BigInt with iota too (no D changes needed here):
> http://d.puremagic.com/issues/show_bug.cgi?id=6447
> because currently this doesn't work (std.traits.isIntegral needs to change, and there changes needed in iota too, because it can't use the current std.traits.unsigned, because a BigInt has no ".min" field):
Yes, it would be nice to allow isIntegral, isArithmetic, etc. to recognize library types and not just built-in types.
This would be helpful for, for instance, rational numbers and decimal numbers (BigDecimal and decimal32, decimal64, decimal128.
As an aside, for those who are interested, the Decimal library implementing the numbers listed above is very near completion. Just some testing and tidying to do before it can go on the review queue.
Paul
More information about the Digitalmars-d
mailing list