Uses lowest() instead of min/max for initial value

Replaces the custom handling (post g++-4.4) of minimum and maximum values for integral and floating-point types with std::numeric_limits::lowest().
This commit is contained in:
Santiago Ospina De Los Ríos committed 2025-10-06 20:15:30 +02:00
1 parent d8e0de2960
commit ee1eb83d27
1 file changed
+1 -11
@@ -254,17 +254,7 @@ private:
template<class T>
T getInitialValue()
{
//g++-4.4 does not support std::numeric_limits<T>::lowest();
// we rely on IEE 754 for floating point values and use min()
// for integral types.
if( std::is_integral<T>::value )
{
return std::numeric_limits<T>::min();
}
else
{
return -std::numeric_limits<T>::max();
}
return std::numeric_limits<T>::lowest();
}
/// \brief Get the underlying binary operator.
///