> So tell me: what are those wonderful things I miss about rtti?
I think RTTI gives better *compile time* type checking than
another solution. I.e. static_cast will gladly cast a void pointer
into the inset hierarchy at compile time, while dynamic_cast will
complain at compile time.
That's the single most important benefit of RTTI over another solution.
Also, as compilers become more clever, dynamic_cast can be better
optimized than a handcrafted tag-solution using static_cast.
Finally, dynamic_cast is the standard way of doing this stuff. Therefore,
it's easier to understand for people than know modern C++.
As I said, I'll try to clean this up with my own version of dynamic_cast
if possible. Then all should be happy. (I agree with Lgb that the
current overhead is insignificant, primarily because the code will
support both methods. Then we can try each approach on a platform
and see what is the best trade off.)
Greets,
Asger