|
Boost : |
From: John Maddock (john_at_[hidden])
Date: 2006-07-25 08:34:19
Johan Råde wrote:
> I agree that having the three functions
>
> is_infinite (or maybe is_infinity)
> is_plus_infinity
> is negative_infinity
>
> is a good idea.
>
> John's proposal has the function is_infinity, in the sense of both
> plus
> and minus infinity, but not the functions is_plus_infinity and
> is_negative_infinity.
>
> Maybe John's intention is that one should test for plus infinity by
> writing is_infinity(x) && x >= 0
> That would work, but is probably inefficient.
For is_plus_infinity why not just:
x > std::numeric_limits<T>::max()
?
John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk