Jump to content
  • Advertisement
Sign in to follow this  
Ben091986

template class with template template member function

This topic is 3771 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!