public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102300] New: Qualified name in class template
@ 2021-09-13  3:07 huangqinjin at gmail dot com
  2021-09-13  3:18 ` [Bug c++/102300] [11/12 Regression] Qualified name of same template in class template is rejected pinskia at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: huangqinjin at gmail dot com @ 2021-09-13  3:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102300
           Summary: Qualified name in class template
           Product: gcc
           Version: 11.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: huangqinjin at gmail dot com
  Target Milestone: ---

template<typename T>
struct holder
{
    template<typename F> struct fn {};

    struct t1 : fn<T> {};                      // pass
    struct t2 : holder<T >::fn<T> {};          // fail
    struct t3 : holder<T >::template fn<T> {}; // fail
    struct t4 : holder<T*>::template fn<T> {}; // pass
};

The code compiles with GCC 10 but not GCC 11.

Output of x86-64 gcc 11.1 (Compiler #2)
<source>:7:35: error: expected class-name before '{' token
    7 |     struct t2 : holder<T >::fn<T> {};          // fail
      |                                   ^
<source>:8:44: error: expected class-name before '{' token
    8 |     struct t3 : holder<T >::template fn<T> {}; // fail
      |         


https://godbolt.org/z/qMav3YrYK

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

end of thread, other threads:[~2022-05-13 12:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13  3:07 [Bug c++/102300] New: Qualified name in class template huangqinjin at gmail dot com
2021-09-13  3:18 ` [Bug c++/102300] [11/12 Regression] Qualified name of same template in class template is rejected pinskia at gcc dot gnu.org
2021-09-13 15:51 ` [Bug c++/102300] [10/11/12 " ppalka at gcc dot gnu.org
2022-01-17 13:31 ` rguenth at gcc dot gnu.org
2022-01-18 23:25 ` jason at gcc dot gnu.org
2022-01-20  3:42 ` cvs-commit at gcc dot gnu.org
2022-01-20  4:19 ` [Bug c++/102300] [10/11 " jason at gcc dot gnu.org
2022-04-13 15:06 ` jakub at gcc dot gnu.org
2022-05-12 22:24 ` cvs-commit at gcc dot gnu.org
2022-05-12 22:25 ` [Bug c++/102300] [11 " jason at gcc dot gnu.org
2022-05-13 12:08 ` cvs-commit at gcc dot gnu.org
2022-05-13 12:11 ` jason 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).