Guys, I've just dipped in to limits.h by MS. I tried to check what's the return type for max() fnc and to my surprise I see something like this:
// TEMPLATE CLASS numeric_limits
template<class _Ty>
class numeric_limits
: public _Num_base
{ // numeric limits for arbitrary type _Ty (say little or nothing)
public:
static _Ty (__CRTDECL min)() _THROW0()
{ // return minimum value
return (_Ty(0));
}
static _Ty (__CRTDECL max)() _THROW0()
{ // return maximum value
return (_Ty(0));//EXACTLY THE SAME WHAT IN min<<------------------
}
//... other stuff
};
so how is it possiple that in both min and max return does exactly the same? So does it mean if I would write makeSanwich() return (_Ty(0)) it would make a sandwich for me? How is it possible that having this same code just fnc names different we are getting different results?