title: Cannot define member of dependent typedef
body: <p>I am writing custom lazy string class.</p>
  
  <pre><code>template &lt;typename charT, typename traits = std::char_traits&lt;charT&gt;&gt;
  class lazy_basic_string
  {
      class char_proxy
      {
          char_proxy&amp; operator=(charT ch);
      };
  
      char_proxy operator[](size_type i);
  }
  </code></pre>
  
  <p>Then i want to define these methods outside of class declaration. </p>
  
  <pre><code>template &lt;typename charT, typename traits&gt;
  using char_proxy = typename lazy_basic_string&lt;charT, traits&gt;::char_proxy;
  
  template &lt;typename charT, typename traits&gt;
  char_proxy&lt;charT, traits&gt;&amp; char_proxy&lt;charT, traits&gt;::operator=(charT ch)
  {
      ...
  }
  </code></pre>
  
  <p>But i got compile error:</p>
  
  <blockquote>
    <p>cannot define member of dependent typedef char_proxy</p>
  </blockquote>
  
  <p>So i can't figure out what's problem here. 
  Why compiler can't use shortcut char_proxy instead of lazy_basic_string::char_proxy ?</p>