[Issue 8864] Simpler syntax for array literal of structs from one argument

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 21 14:26:38 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8864



--- Comment #1 from bearophile_hugs at eml.cc 2012-10-21 14:26:37 PDT ---
It's meant to work with 2D arrays too:


struct Nibble {
    ubyte u;
    this(ubyte ub)
    in {
        assert(ub < 16);
    } body {
        this.u = ub;
    }
}
void main() {
    Nibble[][] data = [[1, 2], [3, 4]];
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list