From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin von Loewis To: Theodore.Papadopoulo@sophia.inria.fr Cc: egcs-bugs@cygnus.com, Jose.Gomes@sophia.inria.fr Subject: Re: Annoying bug in g++ current (egcs-2.92.04 19980914) frontend Date: Sat, 19 Sep 1998 11:32:00 -0000 Message-id: <199809191831.UAA00262@mira.isdn.cs.tu-berlin.de> References: <199809161452.QAA11473@mururoa.inria.fr> X-SW-Source: 1998-09/msg00635.html List-Id: > It works fine with the 1.1 release. Am I wrong to consider this a bug? Yes. According to 14.6.1, [temp.local]/4, your example is ill-formed: >> A template­parameter shall not be redeclared within its scope >> (including nested scopes). A template­parameter shall not have the >> same name as the template name. [Example: >> template >> class Y { >> int T; // error: template­parameter redeclared >> void f() >> { char T; // error: template­parameter redeclared >> } >> }; >> template class X; // error: template­parameter redeclared Egcs 1.1 does not diagnose this rule, and assumes that the local names hide the template parameters, instead. Regards, Martin