Boost logo

Boost :

Subject: Re: [boost] [Boost-users] [Review] ITL review starts today, February 18th
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-03-04 12:50:19


Joachim Faulhaber wrote:
> Well, I've looked at my code. It looks correct. The problem seems to be, that
> numeric_limits< interval<double >::size_type >::infinity()
> maps infinity() to 0.
> if(numeric_limits< std::size_t >::infinity()==0)
> cout << "infinity()==0";
> Sine the test code, that I have done for that only checks for that value
> numeric_limits< interval<double >::size_type >::infinity() against
> cardinality(),
> I didn't detect the problem.
> Is there a standard way to deal with this kind of problem?

Check numeric_limits<...>::has_infinity?
"static T infinity() throw();
Representation of positive infinity, if available.
Meaningful for all specializations for which has_infinity != false.
Required in specializations
for which is_iec559 != false."

In Christ,
Steven Watanabe

Boost list run by bdawes at, gregod at, cpdaniel at, john at