[Bug c++/110688] problem with templates typename
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 17 09:24:12 GMT 2023
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;
More information about the Gcc-bugs
mailing list