Why does sqrt() work fine on an int variable if it is not defined for an int?
Update 2 This question was merged with an exact duplicate, on taking a look at this, the actual answer is much simpler than anyone originally thought. The current version of std_lib_facilities.h includes the following line: inline double sqrt(int x) { return sqrt(double(x)); } // to match C++0x which creates a specific overload for the int … Read more