I just plunged in limits.hfrom Microsoft. I tried to check what the return type is for the function max(), and to my surprise, I see something like this:
template<class _Ty>
class numeric_limits
: public _Num_base
{
public:
static _Ty (__CRTDECL min)() _THROW0()
{
return (_Ty(0));
}
static _Ty (__CRTDECL max)() _THROW0()
{
return (_Ty(0));
}
};
How is it possible that both in minand maxreturn exactly the same? Does this mean that if I wrote makeSanwich () return (_Ty (0)), it would make a sandwich for me? How is it possible that with the same code as with function names only, we get different results?
source
share