Template method overloading

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Tue Jan 23 13:07:48 PST 2007


Kirk McDonald wrote:
> Template member functions are implicitly 'final.' This is a consequence 
> of how templates work. They cannot exist in the vtable.

It's a consequence of how templates work, but in combination with how 
the vtable works. I could imagine a hash-table being added for member 
templates, which would then be filled at startup time[1]...


[1] Current compiler & (especially) linker technology don't allow this 
to be done at compile or link time. A linear table could be done at link 
time in a special section, but that might entail too big a performance 
penalty for lookup :(.




Note: No, this was not a particularly serious suggestion :P.



More information about the Digitalmars-d mailing list