public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110688] New: problem with templates typename
@ 2023-07-16 15:29 irip at qq dot com
2023-07-17 7:33 ` [Bug c++/110688] " rguenth at gcc dot gnu.org
2023-07-17 9:24 ` redi at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: irip at qq dot com @ 2023-07-16 15:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110688
Bug ID: 110688
Summary: problem with templates typename
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: irip at qq dot com
Target Milestone: ---
Test cases such as:
template <class P> struct S01 {
struct P::template T<1> m;
};
Compiler error:
declaration does not declare anything [-fpermissive]
The C++ standard allows class templates to be declared without the need for
typename to refer to the type of an unknown materialized member
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/110688] problem with templates typename
2023-07-16 15:29 [Bug c++/110688] New: problem with templates typename irip at qq dot com
@ 2023-07-17 7:33 ` rguenth at gcc dot gnu.org
2023-07-17 9:24 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-17 7:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110688
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2023-07-17
Known to fail| |13.1.0
Version|4.8.1 |13.1.0
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. Btw, please use a more recent compiler for your reports.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/110688] problem with templates typename
2023-07-16 15:29 [Bug c++/110688] New: problem with templates typename irip at qq dot com
2023-07-17 7:33 ` [Bug c++/110688] " rguenth at gcc dot gnu.org
@ 2023-07-17 9:24 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-17 9:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110688
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We should be able to instantiate it like so:
template <class P> struct S01 {
struct P::template T<1> m;
};
struct X {
template<int> struct T { };
};
S01<X> s;
Clang and EDG accept this.
GCC accepts it like this instead:
typename P::template T<1> m;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-17 9:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-16 15:29 [Bug c++/110688] New: problem with templates typename irip at qq dot com
2023-07-17 7:33 ` [Bug c++/110688] " rguenth at gcc dot gnu.org
2023-07-17 9:24 ` redi 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).