foreach

JR via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 13 02:27:37 PDT 2014


On Thursday, 12 June 2014 at 16:59:34 UTC, bearophile wrote:
> Nick Treleaven:
>
>>there is also this usage:
>>
>> foreach (i, _; range){...}
>
> I think this is a very uncommon usage. I think I have not used 
> it so far.

Would enforcing immutability there be a breaking change?

     foreach (/*immutable*/ i; _; range) {
         version(none) i = 0;
     }


More information about the Digitalmars-d mailing list