return default constructed ``value_type->value_null
` instead of
`std::numeric_limits<value_type>::infinity()
``
This commit is contained in:
parent
8c03ea3d68
commit
8b97c8a7d1
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue