template class with template template member function

Started by
1 comment, last by Ben091986 16 years ago
Hi folks, sorry for my less knowledge, but i didnt found a clue about how to implement that correctly I need a template class with a member function that becomes a template argument itself. I just did not found the syntax for it.

template <class T> Class A
{
//... what so ever
  void normal(T); //normal function
  template<class U> void fun(U); //function with template argument
}
template <class T>
void A<T>::normal(T a)
{
//...
}

//the tricky part
template<class T,class U>
void A<T>::fun(U a)
{
//does not work
}


1>c:\documents and settings\ben\desktop\prometha\header\particle.h(254) : error C2244: 'prtclSys::prtclRender<RenderVertexStruct>::renderRender' : unable to match function definition to an existing declaration
1>        definition
1>        'void prtclSys::prtclRender<RenderVertexStruct>::renderRender(const T)'
1>        existing declarations
1>        'void prtclSys::prtclRender<RenderVertexStruct>::renderRender(particleStore)'
1>c:\documents and settings\ben\desktop\prometha\header\particle.h(255) : error C2061: syntax error : identifier 'RenderVertexStruct'
1>c:\documents and settings\ben\desktop\prometha\header\particle.h(255) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Advertisement
template <class T>template <class U>void A<T>::fun(U a){}
thank you works perfectly

This topic is closed to new replies.

Advertisement