return default constructed ``value_type->value_null` instead of `std::numeric_limits<value_type>::infinity()``

This commit is contained in:
artemp 2014-05-19 12:06:40 +01:00 committed by Dane Springmeyer
parent 8c03ea3d68
commit 8b97c8a7d1

View file

@ -495,7 +495,7 @@ struct div: public boost::static_visitor<V>
template <typename T>
value_type operator() (T lhs, T rhs) const
{
if (rhs == 0) return std::numeric_limits<value_type>::infinity();
if (rhs == 0) return value_type();
return lhs / rhs;
}
@ -514,13 +514,13 @@ struct div: public boost::static_visitor<V>
value_type operator() (value_double lhs, value_integer rhs) const
{
if (rhs == 0) return std::numeric_limits<value_type>::infinity();
if (rhs == 0) return value_type();
return lhs / rhs;
}
value_type operator() (value_integer lhs, value_double rhs) const
{
if (rhs == 0) return std::numeric_limits<value_type>::infinity();
if (rhs == 0) return value_type();
return lhs / rhs;
}
};