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

    <tr>
        <th>Summary</th>
        <td>
            [Clang] concept template parameters not resolving properly for out-of-line definitions
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    ```
template <typename T, typename U>
concept Concept = true;

template <typename T>
struct Class {
    template <Concept<Class> U>
    void do_thing(U&);
};

template <typename T>
template <Concept<Class<T>> U>
void Class<T>::do_thing(U&) {}
```
fails with the error
```
<source>:20:16: error: out-of-line definition of 'do_thing' does not match any declaration in 'Class<T>'
void Class<T>::do_thing(U&) {}
               ^~~~~~~~
1 error generated.
ASM generation compiler returned: 1
<source>:20:16: error: out-of-line definition of 'do_thing' does not match any declaration in 'Class<T>'
void Class<T>::do_thing(U&) {}
 ^~~~~~~~
```
This succeeds in GCC 13, and I expect it to be valid. Specifying `Class<T>` (although unnecessary as far as I know) in the original declaration also does not work.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzclEFvozwQhn-NuYwSgR0gHDikpPnUw3dqe14ZewBvjY1sk2wu-9tXQNo03d1Kq72tFcnBnvE874sZ7r1qDWJJ0juS7iM-hs66stW85lFt5bkkWXz5xXsS7wL2g-YBgbAqnAc0vEd4IrSCt6dnwu6XYGGNwCFAdZkJ20NwIxJ2twR8eubrKT64UQSoNPceSH5JBQB4n3ipMf2bAgm7fwcyBR-tkiDtl9Ap0xK6fSY0I7S4suT7P-P6tHo1x91AzAC32zvCdj8jzSLz_QXl1v-GK-3hpEIHoUNA56z7ZSBhlbejE7gUojFhuyQjbHfJYTuwY1jZZqWVQZDYKKOCsgZsA4TmV6wcpEUPxgboeRAdcHMGiUJzx-cEZaaEG2U0_xvNcDtIev99Gct2skiAFg06HlCul_Xd4_-vaxOWsP2gNDpwGEZnUE6ak3_AnY9-fHjzT53y4EchEKWfyv9XVZCw6RvlRsID4LcBRQAVIFioEY5cK7mGxwGFas7KtECy-AYri4HQLdehs2PbwWgMCvSeuzNwDw130_QAL8aeJlpl5stpnWqV4frGDq69vVp2su5lHcmSyYIVPMIyybZFnNAiZVFXIk0LKqmkzSaVjeQxlcUml6lgMcZJnUaqpDFlcZ7EyTZJU7rOMtZsMp7KotmIWnKyibHnSq-1PvZr69pIeT9imbF8m0aa16j93PsoNXiCeZNQOrVCV045q3psPdnEWvngr6cEFfTcNCvNTUvSPbz2ureuMHDHewzoFqUOvdXHydzB2QGdPkNj3W9umY9Gp8suhMFPV4IeCD20KnRjvRa2J_QwgVym1eDsVxSB0MOM7wk9zPJ-BAAA__-CEMsY">