question in c++

Write a template function that returns the maximum value of three elements passed to the function. Parameters passed to the function can be of int, double, char but all parameters passed are of the same type at point of time. Parameters to be passed to the function as are read as input.