Boost logo

Boost :

From: Bruno Lalande (bruno.lalande_at_[hidden])
Date: 2008-06-01 09:51:37


Hi,

>> Which of the 2 options do you prefer?
>
> Generally I prefer generic rather than specific solutions, so I guess I'd go
> for the latter - but would it be better called "indeterminate_result_error"
> ?

Yep you're probably right, as English is not my native language you
surely master those aspects better than me.

>> For the throw_on_error policy, do you see any existing exception (std
>> or boost) that could fit or is it better to create a new one?
>
> Not sure, the only obvious one is domain_error. Otherwise we're left to
> deriving a new exception type: would this gain us anything - storing the
> return value maybe?

I had thought about domain_error too. I don't think storing the return
value in a new exception type would really bring anything valuable, so
I think we can go with domain_error.

>> For the errno_on_error policy, how about setting errno to EDOM and
>> returning a NaN?
>
> Yep, that's sensible, although should we return the value passed to the
> function: that would be consistent with C99: return 1 but optionally set
> errno as well.

OK if you think it's more consistent with C99, let's return the same
value as ignore_error and set errno.

I should have the time to implement all that next week.

Regards
Bruno


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk