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

            Bug ID: 103593
           Summary: Naming the constructor of a template class without
                    using the injected-class-name causes parse error with
                    C++20
           Product: gcc
           Version: 11.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: enolan at alumni dot cmu.edu
  Target Milestone: ---

This seems to be a GCC 11/12 regression.

https://godbolt.org/z/vTPs9reTW

Flags: -std=c++20

Code:

```
template <typename T>
class Foo {
public:
  Foo<T>();
};
```

Result:

```
<source>:4:10: error: expected unqualified-id before ')' token
    4 |   Foo<T>();
      |          ^
```

Reply via email to