Windows template parameters for std::max

Added template parameter to std::max (i.e. std::max<ValueType>), which was already present for std::min.
This is required to compile under Windows.