title: Accessing outer template class typedefs from inner template class specialization
body: <p>Consider the following code</p>
  
  <pre><code>template&lt;int&gt;
  struct outer{
      typedef int outertype;
      template&lt;int=0, int=0&gt; struct inner;
  };
  
  template&lt;int o&gt; template&lt;int,int&gt; struct outer&lt;o&gt;::inner{
      void f(outertype){}
  };
  template&lt;int o&gt; template&lt;int i&gt; struct outer&lt;o&gt;::inner&lt;0,i&gt;{
      //void f(outertype){}   //test.cpp:11:9: error: ‘outertype’ has not been declared
      void f(outer&lt;o&gt;::outertype){}   //ok but more verbose
  };
  </code></pre>
  
  <p>I highly suspect that the error in the comments is a g++ bug (4.8.2), or is it a strange subtlety in the name lookup rules?</p>