[clang] Pointer to member function should reject explicit object parameter (original) (raw)
Clang accepts the following invalid code:
struct S { int f(int); };
using T = int (S::*)(this int); // Invalid T t = &S::f;
GCC corectly rejects it:
error: a pointer to member function type cannot have an explicit object parameter 4 | using T = int (S::*)(this int); // INVALID | ^~~~~~~~ note: the type of a pointer to explicit object member function is a regular pointer to function type