<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:richard-llvm@metafoo.co.uk" title="Richard Smith <richard-llvm@metafoo.co.uk>"> <span class="fn">Richard Smith</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - An ICE with a variadic alias template aliasing another variadic alias template"
   href="http://llvm.org/bugs/show_bug.cgi?id=18401">bug 18401</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>richard-llvm@metafoo.co.uk
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - An ICE with a variadic alias template aliasing another variadic alias template"
   href="http://llvm.org/bugs/show_bug.cgi?id=18401#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - An ICE with a variadic alias template aliasing another variadic alias template"
   href="http://llvm.org/bugs/show_bug.cgi?id=18401">bug 18401</a>
              from <span class="vcard"><a class="email" href="mailto:richard-llvm@metafoo.co.uk" title="Richard Smith <richard-llvm@metafoo.co.uk>"> <span class="fn">Richard Smith</span></a>
</span></b>
        <pre>See core issue 1430. The current direction there is that this code should be
ill-formed, because the RHS of 'baz' can't be reduced to a type that doesn't
involve an alias template. But we don't have precise core rules for that yet.

I've fixed this for now by disallowing a pack expansion to be used in the
argument list of an alias template, except in the case where it matches the
final parameter of the alias template, and that parameter is also a pack, until
we get a concrete answer from core. Your example gives:

tmp.cpp:3:56: error: pack expansion used as argument for non-pack parameter of
alias template
template<typename T, typename... Args> using baz = bar<Args..., T>;
                                                       ^~~~~~~
tmp.cpp:2:19: note: template parameter is declared here
template<typename T, typename... Args> using bar = foo<T, Args...>;
                  ^

Fixed in r198833.

We may need to revise this later, since we can now reject templates containing
alias template expansions where expanding the outer template removes the
problem from the inner template. But this'll do for now.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>