[utils] allow min/max function to take different argument types in c++.