Avoid std::min because windows.