| Issue |
52883
|
| Summary |
Overloaded static member function cannot be resolved unlike overloaded global function
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Fedr
|
In the following code:
```
void g(int) {}
void g(double) {}
struct A {
static void m(int) {}
static void m(double) {}
};
int main() {
(&g)(0); //ok
(&A::m)(0); //error in GCC and Clang
}
```
the resolution of overloaded global function `g` goes fine, but as to similar static member function `A::m` the overload resolution fails, which looks wrong.
MSVC has not problem with either case. Demo: https://gcc.godbolt.org/z/585e5Gc4b
Related discussion: https://stackoverflow.com/q/68947849/7325599
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs