fork download
#include <iostream>
using namespace std;

template <typename T, typename U>
auto max(T x, U y) -> decltype(x>y ? x : y)
{
    return x>y ? x : y;
}

int main()
{
    cout<<max(17.9,17)<<"\n";
    cout<<max(17,17.9)<<"\n";
}
Success #stdin #stdout 0s 2884KB
stdin
Standard input is empty
stdout
17.9
17.9