
8 Oct
2007
8 Oct
'07
10:49 p.m.
John Femiani wrote:
I remember reading somewhere that sometimes inheritance can be a trick produce smaller type than composition in some cases.
In the case that virtual functions are used by both the base and derived class inheritance will not incur the additional overhead of an extra virtual pointer that composition would do. In this case also the reinterpret cast from one to the other would be non-safe. This is not the case in my design pattern since I don't use virtual functions in the classes that derive from the template argument. Luke