Class Field Size/Offsets

Maxime Chevalier maximechevalierb at gmail.com
Sat Mar 2 14:10:56 PST 2013


The problem persists without the mixin and the template:

class C { int a; }

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

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

Error: this for a needs to be type C not type Foo


More information about the Digitalmars-d mailing list