title: C++ dynamic_cast vs storing object type in a static enum?
body: <p>I am developing a big hierarchy of classes for a framework that will require quite a lot of type casting when it gets done.</p>
  
  <p>My question is, how stupid of an idea is to put in a static member that uses an enum to store all the object types in the hierarchy. Having the member static for every class will not increase the instanced object sizes, and will give a (potentially) faster way to determined the type of an object during runtime than dynamic_cast.</p>
  
  <p>At least that's the basic idea. How adequate would this approach be, and are there any potential flaws?</p>