Adam D. Ruppe:

Well, you can if it is anonymous.

struct Foo {
    union {
        struct { ubyte a; ubyte b; }
        ubyte[2] arr;
    }
}

That works in D, and it makes foo.a == arr[0] and foo.b == arr[1];

Right :-) I like D structs.

Bye,
bearophile

Reply via email to