title: typedef and template parameter with same name
body: <p>Why is that case incorrect (it's logical)</p>
  
  <pre><code>template &lt;typename T&gt;
  struct Der: public Base
  {
      typedef int T;
      T val;
  };
  </code></pre>
  
  <p>, but that case is correct?</p>
  
  <pre><code>struct Base
  {
      typedef int T;
  };
  
  template &lt;typename T&gt;
  struct Der: public Base
  {
      T val;
  };
  </code></pre>
  
  <p>The Standard 14.6.1/7 says:</p>
  
  <blockquote>
    <p>In the definition of a class template or in the definition of a member of such a template that appears outside of the template definition, for each base class which does not depend on a template-parameter (14.6.2), if the name of the base class or the name of a member of the base class is the same as the name of a template-parameter, the base class name or member name hides the template-parameter name (3.3.7).</p>
  </blockquote>
  
  <p>Why is it not ambiguous in here?</p>