A defaulted comparison operator C should be
- a member of C having one parameter of type const C& or
- a friend of C having either two parameters of type const C& or two parameters of type C
see e.g. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2002r1.html
C++20 allows defaulted comparison operators for dependent types. This patch adds the logic to check whether the parameters have the right form
for dependent types.
This fixes #62880