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

    <tr>
        <th>Summary</th>
        <td>
            Clang rejects specialisation of member function template within class template
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            c++20,
            clang:frontend,
            rejects-valid,
            concepts
      </td>
    </tr>

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

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

<pre>
    GCC is under the assumption that it is valid code, and I'm inclined to agree.
```cpp
template <class T> concept C = sizeof(T) == 8;
template <class T> struct A {
  template <class U> U f(U) requires C<typename T::type>; // #1
  template <class U> U f(U) requires C<T>; // #2
};

template <> template <class U> U A<int>::f(U) requires C<int> { } // OK, specializes #2
```
Clang diagnostic:
```
error: out-of-line definition of 'f' does not match any declaration in 'A<int>'
template <> template <class U> U A<int>::f(U) requires C<int> { } // OK, specializes #2
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVMFu6zYQ_JrVZWFDWlqWddDBlp-Loodekg-gyLXFB4lUSSpF8vUFJTsJkLSHnh5gwOByMLM7w5UMwdwscwPlCcpzJufYO9-on7rLOqdfm9_aFk3A2Wr2GHtGGcI8TtE4i7GXEU1M9y9yMBqV0wzUorQafweqRjRWDcayxuhQ3jzzFvIz5EfY5-tPTdNaiTxOg4yMIFo1yBDwCcQPVM4qniK2COKMwbyxuwIdnoDqVEnFA4jTf3KE6GcV8YhQ3YGIX6HPCfqMif05sXv-azaeA7Yg2vg6sZUjJ8IjiGM6g_gB4oRAF6ALAonif5I_fWGiu0vV-X22rxMmyn9VOoJojY0Lc2r4e-UVkXxBqM6PBv78I4UYJlZGDuaNw-eWHsGtx3aQ9obayJt1IRqVxL7DsffOgziim-PGXTfpUaDmq7FmeUruikDVFahC7TigdRFHGVWP0r6iZjVILxeksQn5aTyqfjVrMt0IXYtaZtwU-0NeFGW-22V9k6u6lJRLKqm4Sq67ThWaqSBRqwPXMjMN5SRyQXVxEBXttrTfaxZVVe5JikKWsMt5lGbYDsPLuHX-lpkQZm72xSGvs0F2PIRll4kU0AnoRDkQAbWpksJKA3tnI1v9fuH5J6sYNssWf8DX1QupUJ4z3yTNTTffAuzywYQYPrqIJg7crK_hzvbuUpCPiEceO_Z4na1aPyCPiP42sTcW15ge1Wz2Q9PHOIWU0-L_zcR-7rbKjUCXJH7_20zeJVGgy-JHALoslvwTAAD__x7bc3o">