title: c++ Project Design - private inheritance and "is a" relationship
body: <p>I want to extend a class throught private inheritance.</p>
  
  <p>the base class is: <code>Graph&lt;T&gt;</code></p>
  
  <p>The derived is: <code>Tree&lt;T&gt;</code></p>
  
  <p>We know that a tree is a particular graph, so i want to extend my Graph class without letting user use the PUBLIC methods of Graph class.</p>
  
  <p>Making:</p>
  
  <pre><code>template &lt;typename T&gt; class Tree : public Graph&lt;T&gt;{
  
      .
      .
      .
  }
  </code></pre>
  
  <p>works but i don't want to alter my tree state with Graph class methods. Users must use Tree class specific methods.
  I think i should use private inheritance to get what i want.</p>
  
  <p>The problem is that i can't lose the "is a" relationship, because a Tree is, as a matter of fact, a graph.</p>
  
  <p>What is a good design in order to make things good and semantically ordered?</p>
  
  <p>Thanks</p>