Thursday, November 18, 2010

Class Size

In regards to class size, non-virtual functions, types, and static data members do not add any size to the class.
If you add virtual functions, and non-static data, your class size will grow.

Reference: C++ Templates: The complete guide by David Vandevoorde and Nicolai M. Josuttis. Addison-Wesley, 2003, pp. 289-292

No comments:

Post a Comment