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

    <tr>
        <th>Summary</th>
        <td>
            wrong error: class template partial specialization is not more specialized than the primary template
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    This program with class template partial specialization
```
template <class T, T>
struct A;

template <int& n>
struct A<int&, n> {};

int j;
A<int&, j> a;
```
is accepted by GCC and MSVC, but Clang prints (errorneously) 
```
error: class template partial specialization is not more specialized than the primary template [-Winvalid-partial-specialization]
```
Online demo: https://godbolt.org/z/5qhYTd9qo
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0kk9v2zwMxj8NfSES2FIcWwcf8uf1exp2WLBhR1lSbRWy5Ep0i_TTD06zBu1y2GWAAUMifw8fkpIp2d4b00C5h_KYyZmGEJvW6Jh1QZ-b02ATTjH0UY74YmlA5WRKSGacnCSDk4xkpcM0GWWls6-SbPCQHyHfwTa_fpfjOwP88KZyAnbAE_D_3hISxVkR7oDvrwJ_cNYTsC36O8w1tkguYYRqD9Xxk5b1hI_vdx-px4WSN-Cje5tQKmUmMhq7M_5_OKD0Gr98-35Y4G4mPDjpe5yi9ZQQWG1iDNGbMCd3Bibwru4lCfju7waLNqEPhGOI5hYyGmmQHmkwS_lRxvNNCMr96of1z9JZvbqqrj6tqzze9fbVO-sNajOGxeFANCXgO2AtsLYPuguO1iH2wNpXYG35NPw8afEUMt1wLbiQmWmKKi9YxQSvs6FRlXoQvBLb7iHvNtwUnRCsysW2ftAFVyqzDcsZLwominJTl_Wa6U5s6q3a1nWtmSphk5tRWrd27nlcamc2pdk0Fa9zkTnZGZd-v-bYLEmrbu4TbHJnE6UbRpacaV5i8D3-6x1kc3TNp-lZGuZurcIIrF1MXX-rKYZHowhYe2ksAWsvvf0KAAD__7liKIE">