Template function types will be inferred from the argument values and need not be specified by the programmer.
Template function types will be inferred from the argument values and need not be specified by the programmer.
int i = max(3, 4);double d = max(3.14, 4.7);// assume comparison has been defined for class anObjectAnObject a, b; AnObject c = max(a, b);// mixing types will not workint i = max(2, a); // will produce compiler error