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

    <tr>
        <th>Summary</th>
        <td>
            [Clang] CTAD failure on explicit instantiation of variable template
        </td>
    </tr>

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

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

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

<pre>
    The following C++17 code is accepted by GCC and MSVC, but rejected by Clang.

```c++
template <class T>
struct A { A(T) {} };

template <class>
A a{0};

template A a<int>;
```

Output:
```console
<source>:7:10: error: 'auto' variable template instantiation is not allowed
    7 | template A a<int>;
      | ^
```

See https://compiler-explorer.com/z/PerPhffKG.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8Uk2PmzAQ_TXDZbSRsQEnBw6EbPZQrbrSRr0bM4ArByPbbLv99ZWTtNU2VZElPubNm3mPp0Iw40xUQ7mH8pCpNU7O189qpDmqkyea3Boo61z_Xp8mwsFZ676ZecQW-B74PpeoXU9oAiqtaYnUY_eOT22Lau7x-fVLC7zFbo3o6SvpW721ah43wJp0KnY9-koJrIl0XqyKhCBabVUIeALxCKwJ0a86YoMg99gA356A79ILyAOCPIDYX0nvGK79DSqQe_ZPZKqJ1swxQa_VX5tdkZ_XuKwRxMel3RycpfRJtMGtXtOlv5EgmpyBaJC8dz49AJdqjQ64xDfljeos4e_xZg5RzdGoaNyc_JxdRJXsph5Yg4goEWSL_1kYL1cCQfl4L-CVCKcYl5A08CPwo3bnxVjyD_R9sc6T32h3Bn78Afz4Qv5lGoZPT5usr0W_EzuVUZ1LsduWoqiqbKqrrhiqQSnZ551SZc5Y0Ym8KstuJzq-1ZmpOeMl4_mWFUIW1UYxwfiWF1JxoXaaQcHorIzdWPt23jg_ZiaEleqcy7IqM6s6suEST851Cg1wnpLq69Tw0K1jgIJZE2L4QxFNtJdMX2IG5QHbU3PAQRm7ekI3Y5JrtIl_ue6G-x-Trd7WH10bTZzW7mZVmnq7PSzepYwDP15UBODHm5C3mv8MAAD__8ToCCo">