Boost logo

Boost :

Subject: Re: [boost] New Boost.XInt Library, request preliminary review
From: Peter Dimov (pdimov_at_[hidden])
Date: 2010-03-30 16:47:15

"DE" wrote:
> on 30.03.2010 at 19:45
> Peter Dimov wrote :
>> Right. What is the purpose of the NaN? Its function is to delay the
>> exception until the first use of the result, making the point of the
>> erroneous calculation harder to trace. In what scenario is this a good
>> thing?
> if you don't want to deal with specific exceptions
> xint::integer foo();
> //...
> xint::integer i = foo();
> MY_ASSERT(i!=NaN);

So, in other words, if you don't want to deal with exceptions, you abort the
program on the assert (in debug mode) or throw at the next use of i (in
release mode). This doesn't strike me as very useful.

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