#include <iostream>

using namespace std;

template <typename T>
T max(T x, T y) 
{
    return (x < y) ? y : x;
}

int main()
{
    cout << max<int>(1, 2) << endl;    // kompilator tworzy funkcję max<int>(int, itn)
    cout << max<int>(4, 3) << endl;    // wywoływana jest utworzona już funkcja
    cout << max<double>(1, 2) << endl; // kompilator tworzy funkcję max<double>(double, double)

    return 0;
}