On Tue, Jun 16, 2009 at 8:50 PM, BCS<[email protected]> wrote: > Hello grauzone, > >>>> Huh? You can simple cast the interface to an object. >>>> >>> That is not safe. not all interface instances are D objects. >>> >> There are people who care for COM and C++ interfaces? COM is Windows >> specific, and C++ vtables are... uh, I don't know, >> platform/architecture/compiler vendor specific? >> >> In any case, serializable objects shouldn't contain references to such >> interfaces in the first place. >> > > I think there are ways to have a D interface implemented by a non D object.
He listed the only two possibilities: COM objects and extern(C++) interfaces in D2. typeid(Interface).classinfo.flags & 1 if an interface is COM at least. I don't know if there is any runtime info to indicate whether an interface is C++ or not.
