How does virtual inheritance solve the “diamond” (multiple inheritance) ambiguity?
You want: (Achievable with virtual inheritance) A / \ B C \ / D And not: (What happens without virtual inheritance) A A | | B C \ / D Virtual inheritance means that there will be only 1 instance of the base A class not 2. Your type D would have 2 vtable pointers … Read more