c++/8061: ICE in grokdeclarator, at cp/decl.c:10142

Peter Kolloch kolloch@iri.upc.es
Fri Nov 29 02:46:00 GMT 2002


http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8061

I am not quite certain if the posted code for reproducing the code is legal:

 -------------------------------snip here------------------------
 struct A
 {
     template <typename T> struct B {};
 };
 
 template <typename T> struct C
 {
     typedef A::template B<void> Type;
 };
 -------------------------------snip here------------------------

g++ seems to accept the following (adding the typename keyword to the 
typdef statement):

 -------------------------------snip here------------------------
 struct A
 {
     template <typename T> struct B {};
 };
 
 template <typename T> struct C
 {
     typedef typename A::template B<void> Type;
 };
 -------------------------------snip here------------------------








More information about the Gcc-bugs mailing list