On the richness of C++

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Fri Apr 11 07:01:47 PDT 2008


Sean Kelly wrote:
> With the vtbl checking in D, I think the above call will throw a "not implemented"
> message because D overrides one inherited "new" routine but not the "placement
> new" routine inherited from Object.  In fact, this has me wondering about the
> practicality of this sort of checking at all.  It seems a fairly straightforward
> design for the language to consider broken.

Actually, that doesn't apply to class allocators. Since no instance 
exists yet, they don't do the vtable lookup; they're implicitly static. 
And that means calling inherited class allocators, at least from outside 
the class itself, is an error if a new one is defined.

Also, I'm not sure if you can call an inherited allocator with 'super' 
as you're trying to do in class D.



More information about the Digitalmars-d mailing list