Compiler Error C2997

'identifier' : function parameter list must use template parameter 'parameter'

In templated functions, all template parameters must be used as parameters for the function. The following code generates this error:

template <class T> int max(int x, int y)  // error: T not used
   {return (x>y)?x:y;}