The Linker is not a Magical Program
Sclytrack
idiot at hotmail.com
Thu Sep 3 13:39:28 PDT 2009
I was wondering if the following is useful, probably not.
Reserve a spot on the vtable, which is automatically set to NULL.
class AClass
{
__virtualspot void caption(string text); //no implementation
__virtualspot string caption();
}
class BClass:AClass
{
}
BClass b = new BClass();
b.caption = "test"; //compiles
1. Would compile. But it would not run if the vtable spot
has not been filled up by some API.
2. Can derive from the class/interface, without providing
the implementation.
More information about the Digitalmars-d
mailing list