Click here to Skip to main content
15,881,139 members

Comments by xryl669 (Top 1 by date)

xryl669 6-Feb-12 4:42am View    
Deleted
You're reinventing typeid typeof and the rest, but worst, you're making all the common error of a naive implementation. If you either derive from a ChildClass, you might get the same classID (because you might forget to overload the method).
There is no persistance either in the id (meaning that from one run of the software to another run you'll get different results), and you can't map back to the class name to figure out the id.
You're also paying the cost of adding/growing a virtual table, while typeid doesn't (since it's compile-time based indentification).