Bharat Ahuja
Bharat Ahuja

Reputation: 404

Syntax for defining members of template template class

Can anyone please tell what is syntax for defining member of template template class.

 template< template <typename T > class U, class T >
 class Z
 {
     static void dispatcher();
 };

 template< template <typename T > class U, class T >
 void Z< U >::dispatcher();
 {

 }

I am getting too few arguments error on using above syntax.

Upvotes: 0

Views: 34

Answers (1)

NathanOliver
NathanOliver

Reputation: 180500

Your template has two types: U and T.

You need to use both of them like

 void Z< U, T >::dispatcher()

Also you have an errant ; at then end of

void Z< U >::dispatcher();

Upvotes: 1

Related Questions