https://en.wikipedia.org/wiki/Virtual_method_table
The g++ compiler implements the multiple inheritance of the classes B1
and B2
in class D
using two virtual method tables, one for each base class. (There are other ways to implement multiple inheritance, but this is the most common.) This leads to the necessity for "pointer fixups", also called thunks, whencasting.
时间: 2024-11-14 08:02:25