determining if a void* points to a valid Object

xs0 xs0 at xs0.com
Thu Aug 17 16:43:40 PDT 2006


> Question 2) is a bit trickier. I am honestly not very clear on the 
> specifics of how polymorphism is handled down at the level of the 
> vtable. However I do know vtables are required for polymorphism and 
> should be a real cause for surprise if you ever have an Object instance 
> without a vtable given the D ABI docs.

It can't happen - Object is the base class of all other classes and has 
several virtual methods itself, so any object is guaranteed to have a 
vtable (if only Object's).


xs0



More information about the Digitalmars-d mailing list