Sign in to follow this  

template class with template template member function

Recommended Posts

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

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this