|
Boost Users : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2006-10-26 13:28:54
Johan Råde wrote:
>> But no one has been motivated to actually do this so far.
>
> I'm working on such facets still for handling non-finite floating
> point numbers (infinity and NaN).
> I have code that works fine for float and double,
> but there are still some problems to be resolved for long double.
> And yes, the code has a facility for trapping infinity and NaN,
> if you so wish.
>
> --Johan
Sorry, I should have mentioned this. I had thought that the idea
of trapping the undefined behavior was abandoned for lack of
interest. I'm glad to see I was wrong about this. I looks like
you might want to include bools in this as well.
As I recall, part of the problem with "trapping" was which exception
to throw. Maybe this might be best handled the way other
stream errors are handled - but setting a status flag and requiring
that the user check it.
As you can see, this is a recurring topic. I believe it will be
helpful to serialization, lexical_cast and perhaps others. Also
it may appeal to those of us programmers with slightly
"paranoid" personalities who are convinced that everyone
else is out to catch us.
Robert Ramey
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net