Friday, December 3, 2010

Class Size

class VFGVABC : public virtual VFA, virtual VFB {virtual int f() {return 1;}int g() {return 2;}}; is 8 bytes on Solaris.

The extra function, does not added any extra size.

Reference: http://www.codesourcery.com/cxx-abi/abi.html#vtable

No comments:

Post a Comment