3 ms·
> Member functions are _not_ function pointers that reside inside the struct. ...as long as they're not virtual functions, this is correct. Add a virtual table
by inetknght 9y ago
> Member functions are _not_ function pointers that reside inside the struct.
...as long as they're not virtual functions, this is correct. Add a virtual table and this is less correct (but the optimizer may still make it correct if it can prove the types match).
- andrepd 9y agoYes, that is correct, but then again virtual functions give you new functionality, namely dynamic dispatching. Stick with static inheritance and you won't have this overhead.