<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/65843>65843</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Failure to match alias template against template template parameter
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ecatmur
</td>
</tr>
</table>
<pre>
```c++
template<template<class T> class> struct A {};
template<class T> struct Q {};
template<class T> using R = Q<T>;
int f(A<R>);
int g(A<Q> a) { return f(a); }
```
gcc accepts (since 4.9.0), clang rejects with:
```
<source>:5:24: error: no matching function for call to 'f'
int g(A<Q> a) { return f(a); }
^
<source>:4:5: note: candidate function not viable: no known conversion from 'A<template Q>' to 'A<template R>' for 1st argument
int f(A<R>);
^
```
-frelaxed-template-template-args doesn't seem to help in any recent major.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykU1Fv8ygQ_DXrl1UiDHYdP_jBTZr3VvcHNnjt8B2GCHB7_fcn3FyS6irdSZ-E5DHDLDMLUIxmcswd1M9QHwpa0tmHjjWleQnFyQ-fHTyJr6FBPuchDiD6xPPFUmJQ-weoLcWIf4B6wRVmEFNYdMIeoXmG5gDq3xUeZNfVr_9v9RKNm_ANQR3wFdQ-T94kxiUcQe56UPu3TMj2GzdduddciUC2eU8MnJbgViF9KTD7WFW3Vnz9Tlojac2XFBHkLhqnGattuxVZKPe5B27CwL9Yp4gfJp1B9T-WArWPfgma1wB9DaqXFageOQQfMnAeZ0r6nAOPi9PJeIejD6jJWkweQTYjyOZ38iHULz_6qa6e0Pl8BD1qcoMZKPHdi_MJ3w2dLF_t_un8h0Pt3TuHuLoNfs42-4dLk4_tBWRzTfCNertSOWUZE1KYlpld-u_jRcSHLN9bvRkDW_qLh80_G90BhSni4Dk6kE3CyDxnY2e2FzQOyX1iYM0u4Uy_fNgWQ6eGVrVUcFc-tZWs6p2oi3PXliU3qhl1VZZlW4_qJHdN2XBZV2KnpShMJ4VUohWtaGoh6q0a2x3JUVaNGtTQMFSCZzJ2a-37vPVhKkyMC3dP9a5ShaUT27g-Wykdf-BKgpT5FYcuazanZYpQCWtiivcqySTL3ZGMXQLncOutQrKGIt5aTxMZF9N94gYuFGjmxKFYgu3OKV1ivtTyCPI4mXReTlvtZ5DHvOP1s7kEn98AyOPqM4I8rjn-DgAA__9aIlbo">