utils.h is home to maxInt, maxDouble and maxString, written by a man who 'didn't trust templates' — he's gone, the distrust remains. Today you need max for a new type. Don't write copy number four — write one template and delete three.
Implement maxOf(a, b) as a single function template that returns the larger of two values of any type with operator< — int, double, std::string, anything comparable. No overload per type, no std::max.
template <typename T>)operator< (tests use int, double, std::string)std::max — implement the comparison yourselfmaxOf(2, 7) and maxOf(a, b) with strings?const T& rather than by value?T has no operator<?The body is one line: return (a < b) ? b : a; — only operator< is required of T.
Hit Submit (or ⌘/Ctrl + ↵) — test results will show up here.