don't you mean std::min?