title: C++ polymorphism and template class
body: <p>I have a class of the form:</p>
  
  <pre><code>  template redblacknode&lt;T&gt;
  </code></pre>
  
  <p>Which is stored in a tree of the form:</p>
  
  <pre><code>  template redblacktree&lt;redblacknode&lt;T&gt; &gt;
  </code></pre>
  
  <p>For a particular tree I want the nodes to both store the same information (two different longs) but to be indexed on the different values.</p>
  
  <p>I am initialising the nodes like this:</p>
  
  <pre><code>PageRecord addPR = PageRecord(pageNumber, -1);
  findNode = new redblackNode&lt;PageRecord&gt;(addPR);
  </code></pre>
  
  <p>Can I get polymorphic behaviour out of this (by overloading the == and &lt; operators) even though I am not plugging a pointer into the node?</p>