3 // MT!"y" is analyzed from the pragma inside MT!"x"
14 mixin template MT(string id)
18 mixin("void* " ~ id ~ ";");
21 // Evaluating `typeof(this).init` completes data layout.
23 "CT " ~ id ~ ".offsetof = <\n",
24 cast(int)typeof(this).init.i.offsetof, " > " ~ id);
48 // S1, S2, and S3 should have exactly same data layout.
49 static assert(S1.i.offsetof == S3.i.offsetof);
50 static assert(S1.i.offsetof == S3.i.offsetof);
51 static assert(S1.x.offsetof == S3.x.offsetof);
52 static assert(S1.y.offsetof == S3.y.offsetof);
53 static assert(S2.x.offsetof == S3.x.offsetof);
54 static assert(S2.y.offsetof == S3.y.offsetof);
55 static assert(S1.sizeof == S3.sizeof);
56 static assert(S2.sizeof == S3.sizeof);