<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62233>62233</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
explicit instantiation declaration makes explicit specialization fail
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
lhmouse
</td>
</tr>
</table>
<pre>
https://gcc.godbolt.org/
```c++
template<class T> class X {
public:
static T v;
static void f(T);
};
// vvvvvvvv
#ifndef NO_EXTERN_TEMPLATE
extern template class X<const char*>;
extern template class X<float>;
#endif
// ^^^^^^^^
template class X<const char*>;
template class X<float>;
template<class T> T X<T>::v = 0;
template<class T> void X<T>::f(T arg) { v = arg; }
template<> const char* X<const char*>::v = "Hello";
template<> void X<float>::f(float arg) { v = arg * 2; }
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlE2P2ywQxz_N-II2sof4hYMPyRNHz6HdVpUPe1thjBNaYiKD020_fQWON8k2W7UWwvjPDPMbBsytVbteyhLSNaSbiI9ub4ZS7w9mtDJqTPuj3Dt3tEBXgFvA7U6Ixc60jdFuYYadF-MNxKtzn8VTE4Br34Lq5OGouZNA_xOaW0tqoBWZhk8E8rPZcWy0Ej5S-CSEWMedEqQmJ6Drt-rJqJZ0gEUNyF7nId9cxlMfuMnp_MwiVV3fyo48fnqunurqy-NzXX38_GFVV3Mg-eLk0JOZfgb2WZjeOiL2fABcAa2u6N536rTh7toYkMq-Vd0NJqTV_XaV0b8Q_RXIH6pUB5c6mK-Ark4E6IbEv61_6xVqc-sYKkW4PzLM15xMK3mBrokv232WcFSus3sn3wscIP4vtTaAeA_zhu-yFzNjUO5yEh8cb2nn834NH7UlbRllPJJlkhVJwVKW5NG-TBKRFxIZpqJLWCHadJmKjOUZFl3OOoxUiTHSeJmwmCUFzRcoBBZN0mQsZ1lTdLCM5YErvdD6dPD3L1LWjrLMECmNNG-ktuEuI_byOwmTfhvSTTSU3uehGXcWlrFW1tnLKk45LUv5ctRKKEdUbx3vneJOmZ60Umg-TOMD_yYteTW0RykU1-rnNNtxpaNx0G__Gcrtx2YhzAFw62OeXw_HwXyVwgFuA6kF3IZMfgUAAP__33FVhQ">