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

            Bug ID: 125441
           Summary: Reference qualifiers on function type are ignored
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eczbek.void at gmail dot com
  Target Milestone: ---

https://godbolt.org/z/hfhnTPYGb
Clang and MSVC accept this

```
struct A {};

template<typename> struct B;

template<> struct B<int(A::*)() &> {};

using F = int() &;
B<F A::*> b;
```

```
<source>:8:11: error: aggregate 'B<int (A::*)()> b' has incomplete type and
cannot be defined
    8 | B<F A::*> b;
      |           ^
```
  • [Bug c++/125441] New: Reference ... eczbek.void at gmail dot com via Gcc-bugs

Reply via email to