| Issue |
240148
|
| Summary |
CWG2815 Not implemented by Clang - Rejects valid program
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
ranaanoop
|
The following valid program is rejected by clang, gcc and msvc. This should be accepted due to CWG2815(DR). The below given example is now in the upcoming standard at https://eel.is/c++draft/over#ics.ref-1.4 so it should be accepted but currently clang(like all others) reject it(when it should be accepted now). Here is the example taken directly from the above quoted standard:
```
void g() noexcept;
int h(void (&)() noexcept); // #1
int h(void (&)()); // #2
int j = h(g); // calls #1, an exact match, rather than #2, a function pointer conversion
```
As we can see clang currently rejects this when it should be accepted now.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs