<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/78091>78091</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Wrong class template partial specialization selected
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Fedr
</td>
</tr>
</table>
<pre>
In this program:
```
#include <concepts>
template <auto>
struct A;
template <auto p> requires std::same_as<decltype(p), int*>
struct A<p> {};
template <const int* p>
struct A<p>;
int x = 0;
A<&x> u;
```
both GCC and MSVC select the only defined class template partial specialization and the compilation succeeds. Unfortunately, Clang selects `template <const int* p>` despite the pointer needs to be converted from `int *` and the compilation fails due to undefined class. Online demo: https://godbolt.org/z/Kh9PncWr4
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMk9Fr4zgQxv8a-WVokKXEjh_8kDr1cRzHHSy7fVwUaRxrkSWvNO42_esXuaGlpZQFY2PP6Pd9_kZSKdmzR2zZ7pbtjoVaaAyx7dHE4hTMpf3bA402wRzDOaqJyQPjR8YPrOLX6_lVSOu1WwwCk50OXuNMicm7a3m9E06zU7S2qIXCSzlRXDTBgcnbz_phZvIOIv5cbMQEiUy2Iw9JTfhdJSY7g9rRZUYm9jMTDRMdWE9MHD6Q6lYaq29ZffxEWAef6EpZDXzIeQewnuARmDwCf6nkViaqx6y6vPa_zfEUaIS_ug6UN_Dvl28dJHSoCWhECN5dwOBgPRrQTqUEL05nFckqB2lGbZWzT4ps8CsmL9Vhmq17_pYWrRFN2sBXP4RIi1eE7pLD6pzy56tkAlbxz5OoOBhMsyVcReZgPWEEn-lAAU5Z2D9gJDQwxDBlZM4mT6TiH7oblHUJzIIZsPg3v7uB_7yzHsHgFJg8wEg0p7wJRM9Efw7mFBxtQjwz0T8x0f8zNv97fR-3hWmlaWSjCmzLmu-EKLnYFWNbV40u1aBVI-ptiUM1SDEMButB1c2uUoVtBRdbXpZbvpdc7DZ7Lctqr0VdD3uxlw3bcpyUdRvnHqasXdiUFmzrPW_KwqkTurQeLyE8_oK1yITIpy22ec3NaTkntuXOJkqvFLLksL2PwZ__cNjPc0NTLNG176KxNC6njQ4TE32WuD5u5hh-oCYm-tVYYqJfjf8OAAD__002SfU">