#include <iostream>
#include <string>

using std::endl;
using std::cout;
using std::string;

template <class T>
T my_max(const T &left, const T &right)
{	
	return left > right ? left : right;
}

int main()
{
	string	s1 = "hello", s2 = "world";

	cout << my_max(12, 15) << endl;
	cout << my_max(1232.43, 54.2) << endl;
	cout << my_max(s1, s2) << endl;

	// Error: parameters are of different type
	// cout << my_max(12, 15.0) << endl;

	return 0;
}
