prog.cpp: In function ‘int main()’:
prog.cpp:16:21: error: no matching function for call to ‘f(double, int)’
double x = f(1.5, 3);
^
prog.cpp:6:3: note: candidate: ‘template<class T> T f(T, T)’
T f(T x, T y) {
^
prog.cpp:6:3: note: template argument deduction/substitution failed:
prog.cpp:16:21: note: deduced conflicting types for parameter ‘T’ (‘double’ and ‘int’)
double x = f(1.5, 3);
^