prog.cpp: In function ‘int main()’:
prog.cpp:11:28: error: invalid initialization of non-const reference of type ‘int&’ from an rvalue of type ‘int’
int result = myMax(3, 4);
^
prog.cpp:4:3: note: initializing argument 1 of ‘T myMax(T&, T&) [with T = int]’
T myMax(T& t1, T& t2)
^~~~~