https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128560

            Bug ID: 128560
           Summary: CWG2815 DR - GCC rejects now valid program implicit
                    conversion function with noexcept specifier
           Product: gcc
           Version: 17.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, clang 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 gcc(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 gcc currently rejects when it should be accepted.

Reply via email to