NotAbstrClass
has no data members, so it too is an empty class. Since classes cannot be zero-sized, you get the same treatment as EmptyClass
.
MixClass
has a virtual function, and 1 non-static data member. It seems each of these (vptr
and int
) occupy 4 bytes on your platform, so the size is 8 bytes.