title: Dependent scope and nested templates
body: <p>When I compile this:</p>
  
  <pre><code>#ifndef BTREE_H
  #define BTREE_H
  #include &lt;QList&gt;
  
  template &lt;class T, int degree&gt;
  class btree
  {
  public:
      class node
      {
      public :
          node();
      private:
          node* parent;
          QList&lt;T&gt; values;
          QList&lt;node*&gt; children;
      };
  public:
      btree();
      void insert(const T&amp; value);
      node* findLeaf(const T&amp; value);
      void performInsertion(const T&amp; value, node&amp; place);
      //
      node* root;
  };
  #endif // BTREE_H
  </code></pre>
  
  <p>Implementation of findLeaf is this:</p>
  
  <pre><code>template &lt;class T, int degree&gt;
  btree&lt;T,degree&gt;::node* btree&lt;T,degree&gt;::findLeaf(const T &amp;value)
  {
      if(root == NULL)
          return root;
  }
  </code></pre>
  
  <p>This error occurs:</p>
  
  <pre><code> error: need ‘typename’ before ‘btree&lt;T, degree&gt;::Node’
   because ‘btree&lt;T, degree&gt;’ is a dependent scope
  </code></pre>