template overloading question

I need to overload a function template so that it can handle between 1 to 6 arbitrary arguments. So I have these declarations:

Code:

` template<typename T> `

void f(int verbose, const T&);

template<typename T1, typename T2>

void f(int verbose, const T1&, const T2&);

template<typename T1, typename T2, typename T3>

void f(int verbose, const T1&, const T2&, const T3&);

template<typename T1, typename T2, typename T3, typename T4>

void f(int verbose, const T1&, const T2&, const T3&, const T4&);

template<typename T1, typename T2, typename T3, typename T4, typename T5>

void f(int verbose, const T1&, const T2&, const T3&, const T4&, const T5&);

template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>

void f(int verbose, const T1&, const T2&, const T3&, const T4&, const T5&, const T6&);

I also need different handling for arrays, so I go with

Code:

` template<typename T>`

void f(int verbose, const T a[], int size);

Now the problem. When I call f with

Code:

`double a[10];`

f(1, a, 10);

it resolves to

Code:

` template<typename T1, typename T2> `

void f(int verbose, const T1&, const T2&);

rather than the array template.

I understand that in this case I should use a template specialization, but how do you do it when the specialization also involves a template typename?

Thanks for any help.