<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/130362>130362</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Variadic template template parameter of another template template parameter causes spurious error upon instantiation
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ednolan
      </td>
    </tr>
</table>

<pre>
    Given the following code:

```cpp
template <template <template <typename...> typename> typename>
struct foo {};

template <template <typename> typename>
struct bar {};

using baz = foo<bar>;
```

Clang 20 produces the following error:

```
<source>:1:52: error: too few template parameters in template template parameter redeclaration
    1 | template <template <template <typename...> typename> typename>
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
    2 | struct foo {};
      | ~~~~~~~~~~~~~~
    3 | 
    4 | template <template <typename> typename>
 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<source>:7:17: note: template template argument is incompatible with its corresponding template template parameter
 7 | using baz = foo<bar>;
      |                 ^
<source>:4:39: note: template parameter is declared here
    4 | template <template <typename> typename>
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
<source>:7:17: note: template template argument is incompatible with its corresponding template template parameter
    7 | using baz = foo<bar>;
      | ^
<source>:1:62: note: template parameter is declared here
    1 | template <template <template <typename...> typename> typename>
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
```

Compiler explorer link: https://godbolt.org/z/7q7n459E1

This code was accepted by Clang 19, and is accepted by GCC, MSVC, and EDG.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzMVU2TozYQ_TXi0rUUSGANBw4MY88pp6T2LkTbKBESkcQ4s4f89pRgZj1lj-3KR1VWRdkSrW7e69dSC-_VwSDWpHwk5VMi5jBYV2NvrBYm6Wz_Wj-rFzQQBoS91doelTmAtD0S1pBseTbZ-shpIlkTcJy0CAiEtVfnrxMaMWKapoRt4X15NidZ44ObZYC9tUD4I-FPhD2uX70X-mqsTrjzWLOPpDrxDQh7ih8jrO2Ei27rlneG6_ZWC3MAmsHkbD9L9GfZQeesu0xPnLPW29nJBRFrcsKakhLWfHeBYC3s8QjfKU3CiREDOg_KnF5f2sFhj1ILJ4KyhmQNAEAOhLfwn0oCy4hh_7w9SLn9sFgd6eJ4RdVrkd9MbDG9LYrbxK6jvwv8UiYepYo_YGzARaULGYQ7zCOaACrqJO04iaA6jXBUYQAVPEjrHPrJmj7WyA0hI0q-4LxXl6eEnQ9Sbi95FIQ1rPqUx6mKlIe1jLCHAR3-23x_AvFO0fwQAgD8bQ0-hR6P-Ib-s5z_n4f3hjZnl6EdJ6XRAf4xaevQgVbmt0h0CGHy8RqkO0J3B9t3VofUugOhu2-E7vjv3BRltc3XQL8Myi-NBY7Cg5ASp4A9dK-w3rd5RWgLwvQxXR_Nz20bLT_9_LV937F9ek6TvmZ9xSqRYJ3zImcPfFNtkqEWfM_2HS1pl-dlRbNK5hX2skJeFkXxwBNV04yWGcs4pcVDvkmRS17xbsNkIXle7UmR4SiUTrV-GSOjRHk_Y52zjG1ookWH2i89lVKDR1ishNLYYl0dnb5088GTItPKB38KE1TQWH8VToleyZu3vd2DMDYM6G5uk2L26MFPs1N29mujgXmyBpTxQZigln6RzE7XZ4qpMMxdKu1I6C5CfPv7Mjn7K8pA6G4h5gndvTF_qelfAQAA__-3VbZi">