#include
#include
using namespace std;
double larger(double a, double b);
long& larger(long& a, long& b);
int main()
{
cout << larger(1.5, 2.5) << endl;
cout << larger(static_cast(12), static_cast(13))
<< endl;
return 0;
}
double larger(double a, double b)
{
cout << " double version. ";
return a>b ? a : b;
}
long& larger(long& a, long& b)
{
cout << " long ref version. ";
return a>b ? a : b;
}
double version. 2.5
double version. 13