[PATCH] D37308: Interface class with uuid base record

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 13 16:10:30 PDT 2017


erichkeane added a comment.

A bit more research based on a different implementation:

First, there are TWO special types, not just IUnknown!  There is also "IDispatch" with UUID: "00020400-0000-0000-c000-000000000046"

A type is 'interface like' if:
-it has a ZERO virtual inheritance bases
-it has AT LEAST 1 'interface-like' base (interfaces are not 'interface_like' here)
-it has ZERO non-interface/non-interface-like bases.
-it has zero user defined destructors, constructors, operators, or conversions
-it has zero DEFINED methods
-it has ZERO data members
-it does not have 'private' or 'protected' data access specifiers
-it does not have any "friend" decls.

An __interface can inherit from other __interfaces, or interface-like bases.  However, it is limited to only 1 of the latter.

SO, in your example, "Page5" loses its interface-like-ness because it has 2 separate interface-like bases.


https://reviews.llvm.org/D37308





More information about the cfe-commits mailing list