[cfe-dev] COM ABI support?

Stephen Lin swlin at post.harvard.edu
Thu Jul 11 07:48:18 PDT 2013


> COM uses pure abstract base classes, but *not* virtual inheritance. Which
> makes for a simpler vtable layout. And is the reason why you have to be
> careful returning the correct pointer in IUnknown::QueryInterface (COM's
> dynamic_cast on steroids) when inheriting from multiple interfaces.
>
> -Nico

Thanks, I did not realize that (it's all hidden behind macros when you
use the IDL-generated files, so it's hard to see what is going on...).

Not relying on virtual inheritance does make a lot more sense in
keeping the ABI simple, but, as you say, does require care when
implementing objects.

Stephen



More information about the cfe-dev mailing list