You might want to use the std::min_element
algorithm, which will use the normal less-than operator to retrieve an iterator to the smallest element in a range. This completely eliminates the need for you to write this function on your own.
Hope this helps!