On Tuesday, 9 May 2017 at 13:19:09 UTC, Timon Gehr wrote:
On 07.05.2017 19:03, Stanislav Blinov wrote:
On Sunday, 7 May 2017 at 16:57:58 UTC, Andrei Alexandrescu wrote:
[...]

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

Yes! Finally!

Reply via email to