static foreach is now in github master

Seb via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Jul 20 13:08:42 PDT 2017


On Thursday, 20 July 2017 at 19:53:46 UTC, Jack Stouffer wrote:
> On Tuesday, 18 July 2017 at 15:46:04 UTC, Seb wrote:
>> https://is.gd/1TCQOh
>
> Hmmm, that code is printing
>
>>0
>>1
>>2
>>3
>>0
>>1
>>2
>>3
>
> for me. Shouldn't it just be printing once?

I bet you are using `rdmd`?
It runs dmd twice on your main file ;-)
See also:

https://issues.dlang.org/process_bug.cgi
https://github.com/dlang/tools/pull/191
https://github.com/dlang/tools/pull/194 (sadly this was reverted)


More information about the Digitalmars-d-announce mailing list