views:

79

answers:

1

Very similar to this post

How can I declare template array as a parameter in templated function?

Something like this code:

template <unsigned i> void my_func (char (&a)[i]); //yes, I do need that reference
+4  A: 

Just declare an extra template parameter, which contains the type in question.

template <typename T, unsigned i>
void my_func (T (&a)[i]);
Billy ONeal