I have a template method as follows:-
template<typename T, int length>
void ProcessArray(T array[length]) { ... }
And then I have code using the above method:-
int numbers[10] = { ... };
ProcessArray<int, 10>(numbers);
My question is why do I have to specify the template arguments explicitly. Can't it be auto-deduced so that I can use as follows:-
ProcessArray(numbers); // without all the explicit type specification ceremony
I am sure I am missing something basic! Spare a hammer!