Well, first of all, I'll remind everyone that the design of the solution to implement polymorphism is an ABI decision outside of the Standard. For example, MSVC and the Itanium ABI (followed by gcc, clang, icc, ...) have different ways to implement this.
With that out of the way, I think that this is an optimization for lookup.
Whenever you have a Derived
object (or one of its descendant) and lookup the mumble
member, you do not need to actually find out the Base2
subobject but can directly act from the Base1
subobject (whose address coincides with Derived
subobject, so no arithmetic involved).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…