title: Typedef an enum value in C++
body: <p>I have a base class that has an enum value that I am using in the derived class. The base class is a <code>Table&lt;&gt;</code> and the derived class is a <code>Matrix&lt;&gt;</code>. Now the enum value in <code>Table&lt;&gt;</code> is <code>TABLE_SIZE</code> which is used in the <code>Matrix&lt;&gt;</code> class. Since <code>TABLE_SIZE</code> does not make a lot of sense (it does a little!) in the matrix class, I thought I would typedef it to something more consistent with <code>Matrix&lt;&gt;</code> (<code>MATRIX_SIZE</code>).</p>
  
  <pre><code>typedef TABLE_SIZE MATRIX_SIZE;
  </code></pre>
  
  <p>That didn't work, which was a bit surprising. I am guessing I can't typedef the value because the enumeration is a type but not the values (not sure if that is a correct observation)?. So, now the question is, how-do-I/can-I accomplish the above?</p>
  
  <p><strong>EDIT:</strong> One thing I forgot to mention is that I do not want the Matrix class to increase in size (yes I realize it is a tiny increase and wouldn't matter for most people, in my case, it does).</p>