https://bugs.llvm.org/show_bug.cgi?id=52279
Bug ID: 52279
Summary: Erroneous acceptance of ambiguous conversion of
overload template function to function pointer type
Product: clang
Version: 12.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++2b
Assignee: unassignedclangb...@nondot.org
Reporter: fchelno...@gmail.com
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
This is code is ill-formed due to ambiguous conversion:
```
auto f(auto) { return 1; }
int f(auto) { return 2; }
int main() {
[[maybe_unused]] int(*x)(int) = f;
}
```
it is rejected by GCC, but accepted by Clang. Demo:
https://gcc.godbolt.org/z/oaG1GGxd9
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs