https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115888
Bug ID: 115888 Summary: GCC rejects valid program involving explict object member function Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jlame646 at gmail dot com Target Milestone: --- The following valid program is rejected by gcc and clang but accepted by msvc. Demo: https://godbolt.org/z/a3vz3TW8q ``` #include <iostream> struct C{ int f(this int); }; decltype(C::f) func; int main() { func(3); //msvc accepts but clang and gcc rejects } int func(int j) { std::cout << "called with: " << j << std::endl; return 5; } ``` For future references this potential bug was discovered here: https://stackoverflow.com/questions/78739117/explicit-this-member-function-use-accepted-by-msvc-but-rejected-by-clang-and-gcc