Class Field Size/Offsets

Walter Bright newshound2 at digitalmars.com
Sat Mar 2 14:19:15 PST 2013


On 3/2/2013 2:10 PM, Maxime Chevalier wrote:
> The problem persists without the mixin and the template:

It compiles without complaint for this code:
--------------------------------------------
import std.stdio;

class C { int a; }

struct Foo
{
     void foo()
     {
         auto sz = C.a.sizeof;
         writefln("sz: %s", sz);
     }
}

static this()
{
     Foo f;
     f.foo();
}

void main() { }
-----------------------------------------


More information about the Digitalmars-d mailing list