What's in a empty class?

TheFlyingFiddle via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Oct 27 14:23:43 PDT 2015


With this code:

class A { }
pragma(msg, __traits(classInstanceSize, A));

I get the output 8 (32-bit).
I can account for the first thing a vtable. But that
should only cover 4bytes. What's in the other 4bytes?


More information about the Digitalmars-d-learn mailing list