Templatize dynamic cast. better user customized RTTI

Jarrett Billingsley kb3ctd2 at yahoo.com
Sun Nov 11 21:28:14 PST 2007


"davidl" <davidl at 126.com> wrote in message news:op.t1nqmwn5eb62bo at lzg...

> It would make the code size smaller with a very neglectable runtime cost.

At the call site, yes, it will become slightly smaller.  But you've 
forgotten that you then need to have a separate copy of the dynamic cast 
function for every class that you do a dynamic cast to.  With the current 
way of doing things, there's only one function. 





More information about the Digitalmars-d mailing list