public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103593] New: Naming the constructor of a template class without using the injected-class-name causes parse error with C++20
@ 2021-12-06 22:32 enolan at alumni dot cmu.edu
  2021-12-06 22:42 ` [Bug c++/103593] [11/12 Regression] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: enolan at alumni dot cmu.edu @ 2021-12-06 22:32 UTC (permalink / raw)
  To: gcc-bugs

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>();
      |          ^
```

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-10-16 15:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 22:32 [Bug c++/103593] New: Naming the constructor of a template class without using the injected-class-name causes parse error with C++20 enolan at alumni dot cmu.edu
2021-12-06 22:42 ` [Bug c++/103593] [11/12 Regression] " pinskia at gcc dot gnu.org
2021-12-07  9:44 ` rguenth at gcc dot gnu.org
2021-12-07 13:54 ` ppalka at gcc dot gnu.org
2021-12-07 14:08 ` ppalka at gcc dot gnu.org
2021-12-07 14:20 ` mpolacek at gcc dot gnu.org
2022-04-28 10:16 ` pinskia at gcc dot gnu.org
2022-10-16 15:42 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).