4 ms·
Virtual table should be one per class. A type field would be once per instance.
by jonhohle 9y ago
Virtual table should be one per class. A type field would be once per instance.
- euyyn 9y agoAh, right, static fields in C++ can't be overridden. If they could, they could be implemented by stuffing them in the virtual table and the cost in space would be O(classes) instead of O(instances).