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

    <tr>
        <th>Summary</th>
        <td>
            Implement CWG2369
        </td>
    </tr>

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

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

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

<pre>
    From http://wg21.link/cwg2369 , https://gcc.godbolt.org/z/nEqhM5dsG

```
template <class T> struct Z {
  typedef typename T::x xx;
};
template <class T> concept C = requires { typename T::A; };
template <C T> typename Z<T>::xx f(void *, T); // #1
template <class T> void f(int, T);             // #2
struct A {} a;
struct ZZ {
    template <class T, class = typename Z<T>::xx> operator T *();
    operator int();
};
int main() {
    ZZ zz;
    f(1, a);   // OK, deduction fails for #1 because there is no conversion from int to void*
    f(zz, 42); // OK, deduction fails for #1 because C<int> is not satisfied
}
```

compiles with GCC 11 and newer, but fails with clang-trunk and GCC 10 and older because they don't implement the CWG2369.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNVE1v2zAM_TXyhWjgzzg--JAmbTEMwy4FBvQmW7StVbFSS27T_PpRspePrR1myBYlUY-PT5QrLd7L-0HvoLN2z5I1i--pvbVxtFCyfya7pkGyLIDFG-9kTl5tXS9aLSqt7EIPLc0c6e3vXrpvmTAPLNyycD1_l-Hc_NDibq-4RWDJplbcGHhkyR0YO4y1hSdg-e3kCGDf9yiw8X3Pd-g819QOcDiwZHZj-fZkf4Jd677GvYUNzW9hwJdRDmhcpL-g6b2FzyA3E9xpzxPNuZmZ1QEaFq9etRQk2Npp9sjiwgN6zahLon8S9XsdiOzt5f7L54wVT1izcmuvXL4FfuL-W9MrUUnWD4JTsMl0Cn2aoOOo9zhwqwd4nLJcTRzP8CcHn8TV8qWwtAo7LvvJ5ZohMT4er0CdKJFjyU-SzEJ8_-qmBQpKVeoeGi6VgYbiO7mhwpqPBsF2OCBIA7129fCKg_Herv4dFau9-i6lq6DEg-DT-Pok_zPohvRzKpBsPrIFw600jURxFuSjSzJ9a73bS0WV-iZtBw9Uf1EEvBfQ4xsOjkE12jm2d6Ej7NsbOvX-2fv5LaE3tRI4XKrxDkKT-LkFSeWAO3QidMT5x4O784tAlIkokoIHVlqF5ZeT1-wRjIMq__grEImxWhBvGij1-ru72Q_6J9ZUDvfSmBENGVmapmHQlSvMmiqsMS7SPMqWKOpllC4zkSVNvIyaPFC8QmVKlt2yOKbMwUOQzbJtIMs4jOMwiVZRlhRhsRB5syx4mCZNgWkeViwNkcpMLRwP96sKhtJTqsbW0KKSxprzIl0B2faIPhzh89F2eihb3R-50lUb-OClJ_8LwESIhA">