title: Is "typename" allowed/required in C++11 using-declaration?
body: <p>The following code compiles correctly in g++ and clang:</p>
  
  <pre><code>template&lt;typename T&gt;
  struct foo
  {
      class iterator;
      using bar = foo::iterator;
  };
  
  int main() {}
  </code></pre>
  
  <p>however MSVC 2013 gives the following errors:</p>
  
  <pre><code>foo.cpp(9): error C2061: syntax error : identifier 'iterator'
            foo.cpp(10) : see reference to class template instantiation 'foo&lt;T&gt;' being compiled
  foo.cpp(9): error C2238: unexpected token(s) preceding ';'
  </code></pre>
  
  <p>If I change that line to:</p>
  
  <pre><code>using bar = typename foo::iterator;
  </code></pre>
  
  <p>then all three compilers compile it successfully.  Is the original version correct? (i.e. is this a MSVC bug, or a gcc/clang extension)</p>