title: C++ How to avoid dynamic_casting?
body: <p>I have done a little research on dynamic_casting, and I read that it creates something called the RTTI,
  which is loaded in RAM too at start-up. At some platforms this isn't supported too I think. So I was wondering if there was any good solution to avoid it.</p>
  
  <p>Let's say I have Statement class</p>
  
  <pre><code>class Statement
  {
      std::list&lt;Operand*&gt; operands;
  };
  </code></pre>
  
  <p>and a Operand is a class with more subclasses like, memory address, register, ect. ( For some wondering, I am trying to make an assembler.:P</p>
  
  <p>I can't go downcasting with dynamic_cast, which is also bad if I could. But what if I added a enumeration to Operand, which defines it's Type, so I can downcast with static_cast by using it's type.</p>
  
  <p>I could make it a const, and define it in the constructor of every subclass right?</p>
  
  <p>I am looking forward to what you all think.</p>
  
  <p>Christian</p>