The current specification works fine for finite values. But if a user expects hmin/hmax to give correct results when infinities may be in the input, then the current specification makes this impossible to implement efficiently.
Suggested fix:
template<class T, class V>
typename V::value_type hmin(const const_where_expression<M, V>& x);
Returns: If none_of(x.mask), the return value is numeric_limits<V::value_type>::max()infinity().
template<class T, class V>
typename V::value_type hmax(const const_where_expression<M, V>& x);
Returns: If none_of(x.mask), the return value is -numeric_limits<V::value_type>::lowest()infinity().
The current specification works fine for finite values. But if a user expects
hmin
/hmax
to give correct results when infinities may be in the input, then the current specification makes this impossible to implement efficiently.Suggested fix:
Returns: If
none_of(x.mask)
, the return value isnumeric_limits<V::value_type>::
max()
infinity()
.Returns: If
none_of(x.mask)
, the return value is-
numeric_limits<V::value_type>::
lowest()
infinity()
.