<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/121648>121648</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
The intersection of a concept which isn't satisfied and deducing this crashes clang 19
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ojrosten
</td>
</tr>
</table>
<pre>
The following code crashes the compiler:
```
template<class T>
concept check_for = requires(T t) { check(t); };
struct foo{
template<class Self>
void check(this Self& self, int);
static_assert(check_for<int>);
};
```
https://godbolt.org/z/cTd3bna8G
It looks like this is fixed on trunk. However, I haven't been able to track down what fixed it so thought this bug report may be useful.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxkUsFu4yAU_Bp8eWqEwY7jgw9J2-z2vLlXGJ4NDYEsPCfb_fqVnbRd7UpISLzxzLzxqJzdGBA7Vu9Y_VSoiWxMXXxLMROGoo_mvTtYhCF6H68ujKCjQdBJZYsZyCLoeDo7j4nJLePLWfP74VvC09krQiYftVc5w4HJZ8a3OgaNZwJtUR9fh5iAySdI-HNyCTMTmwMQEy2wZnfDMLGZH5jcAWuemNzdtDKlSRMMMbJmfgIA-E_zB_rhJjuPL9GZL07r7nOxhrzcj-DCXeqmAZkUOf2qcsZETGw-TTP5OGPl8xf809tfITC-tUTnPCck9kzsx2j66GkV08jE_jcTe30wsg9q8-0GfyHwMR4zeHdEWEy6DIP7hQZiAEpTOK7ge7ziBdNs-QWsumBgoiHoEQOo3iNQBEpKH8HEa4CrVXTncAQ5Atk4jZZu_P00QsJzTAQn9Q49wpRxmPyqMJ00rWxVgV3ZyDXnciPqwnZ63famLKvGlK1clxo117rCajDYVtKUhesEFzUveVXWZcPrlRENV9LouqmlFu2GVRxPyvmV95fTnEbhcp6wK0W5rjaFVz36vHRTCO1VGJkQc01TN3_w0E9jZhX3LlP-oiBHHpfSukCYMmpyMUAcQMFH7a7WaQsu3wLLilweHBpQwYBBM-m56UssH01f5KFsiyn57p-_6chO_UrHExP72cb9ejin-IaamNgva2Um9vfNLp34EwAA__-4hBsW">