------- Additional Comments From boris at buf dot com  2004-12-13 17:36 -------
(In reply to comment #2)
> 3.3.2 also rejects this code also:

  I'm really sorry, it seems I oversimplified our real test case
(the previous problem might be related, but indeed it's not a regression).
  
  The following code is a closer version of what we have, and this time
it compiles fine with g++ 3.3.1, but not with g++ 3.4.0 :

template<class T1,int N1>
class Class
{
public:
    template <class T2,int N2> void function( const Class<T2,N2>& );
};

template<>
template<class T2,int N2>
void Class<int,1>::function( const Class<T2,N2>& param ) 
{
    param;// line 12
}

int main()
{
    Class<int,1> instance;
    Class<char,2> param;
    instance.function( param );
}

  The output is :

test-gcc34.cpp: In member function `void Class<T1, N1>::function(const Class<T2,
N2>&) [with T2 = T2, int N2 = N2, T1 = int, int N1 = 1]':
test-gcc34.cpp:12: error: `param' undeclared (first use this function)
test-gcc34.cpp:12: error: (Each undeclared identifier is reported only once for
each function it appears in.)


  Sorry about the misinformation in the first place.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18950

Reply via email to