Mixed int/BigInt foreach interval

bearophile bearophileHUGS at lycos.com
Mon Sep 26 18:49:49 PDT 2011


Jonathan M Davis:

> Why is it bad? isIntegral was specifically designed for testing that a type was 
> one of byte, ubyte, short, ushort, int, uint, long, and ulong, and that's 
> exactly what it's doing.

Going back to my original post, is changing the semantics of isIntegral enough to allow code like this to compile and run?

foreach (i; 1 .. BigInt(10)) {}

Bye,
bearophile


More information about the Digitalmars-d mailing list