Working code in an upcoming PR by Timon Gehr
Timon Gehr via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Tue May 9 06:19:09 PDT 2017
On 07.05.2017 19:03, Stanislav Blinov wrote:
> On Sunday, 7 May 2017 at 16:57:58 UTC, Andrei Alexandrescu wrote:
>> Zoom in on the screen for a nice surprise! http://imgur.com/a/qjI4l --
>> Andrei
>
> I see only unsurprising Jpeg artifacts and not much more :)
> It's too low resolution to make anything out.
It's approximately this:
---
alias Seq(T...)=T;
void main(){
import std.stdio: writeln;
import std.conv: to;
static foreach(i;Seq!(0,1,2)){
mixin(`int x`~to!string(i)~" = i;");
}
writeln(x0," ",x1," ",x2);
}
---
./src/dmd -run staticforeach.d
DMD v2.075.0-devel-fd4ff76 DEBUG
0 1 2
---
That was the first test case that worked.
I have made it almost feature-complete yesterday:
https://github.com/tgehr/dmd/blob/static-foreach/test_staticforeach.d
More information about the Digitalmars-d-announce
mailing list