title: Pack expansion for alias template
body: <p>It seems that a pack argument can be expanded <strong>only</strong> in the place of a pack parameter of an alias template. This is not true for a class or a function template:</p>
  
  <pre><code>template &lt;class T, class... Args&gt; struct x { using type = T; };
  
  template &lt;class T, class... Args&gt; using x_t     = typename x&lt;T, Args...&gt;::type;
  template &lt;class... Args&gt;          using x_fix_t = typename x&lt;Args...&gt;::type;
  
  template &lt;class... Args&gt; auto f(Args...) -&gt; void {
    typename x&lt;Args...&gt;::type v1; // OK
    x_t&lt;Args...&gt; v2; // Error
    x_fix_t&lt;Args...&gt; v3; // OK
  }
  </code></pre>
  
  <p>simpler case:</p>
  
  <pre><code>template &lt;class T, class U&gt; using y_t = T;
  
  template &lt;class... Args&gt; auto f(Args...) -&gt; void {
    y_t&lt;Args...&gt; v4; // Error
  }
  </code></pre>
  
  <p>The above code generates error (even if <code>f</code> is never instantiated) with both <code>c++11</code> and <code>c++14</code> in <code>g++ 4.9</code>, <code>g++ 5.1</code> and <code>clang 3.5</code>.</p>
  
  <p>Why is this not permitted and what is the general rule? I see no reason to restrict this. It seems a very strange prohibition.</p>
  
  <p>As for why not writing as <code>x_fix_t</code> with the first variant it is more clear that <code>x_t</code> has a mandatory first argument. (for instance that is the reason <code>f()</code> is not permitted). But this is not that important, the fix is easy. The question remains: Why?</p>
  
  <p>gcc error:</p>
  
  <pre><code>error: pack expansion argument for non-pack parameter ‘T’ of
  alias template ‘template&lt;class T, class ... Args&gt; using x_t = typename x::type’
  </code></pre>
  
  <p>clang error:</p>
  
  <pre><code>error: pack expansion used as argument for non-pack parameter of
  alias template   x_t&lt;Args...&gt; v2;
  </code></pre>