Boost logo

Boost Users :

From: Lorenzo Cavallaro (sullivan_at_[hidden])
Date: 2008-01-16 20:18:27


Dear All,

   for some reason I still haven't received Ed msg thru boost-users mailing
   list, but, anyway, seeing it quoted helped out ;-)

   Basically, I had an old but working serialized model, M, but I made a
   change to the new code base (library) by adding one extra bool (which I
   didn't remember to as it was a very small change) to the serialized class.
   Thus, the new library code failed to unserialize M due to this
   inconsistency. A "fresh" model solved the issue (more or less; it's a
   little bit more complicated than this, but it'd be useless to bother you
   :-)).

   My bad ;-) Thanks! The hint helped a lot!

bye,
Lorenzo

On Wed, Jan 16, 2008 at 09:23:27PM +0100, Johan R?de wrote:
> > Hi Lorenzo,
> >
> > Under these circumstances:
> >
> > 1) classes contain float or double members
> > 2a) [intentional] the floats/doubles are used to store
> > NaN or +/-Inf values
> > 2b) [unintentional] the floats or doubles are un-initialized
> > and the memory they use just happens to contain (by
> > circumstance) bit patterns for NaN or +/-Inf
> >
> > serialization to text or XML will "work" (that is, will run without
> > errors) but de-serialization will result in stream errors since:
> >
> > double a;
> > cin >> a;
> >
> > fails for "NaN", "Inf", etc.
> >
> > Ed

>
> If the problem is the presence of infinity and NaN,
> then you can solve the problem by using my Floating Point Utilities library.
> It is available in the vault in folder Math - Numerics.
> You need the facets in the header non_finite_num_facets.hpp.
>
> It is not accepted into Boost yet, but the code is mature and has been tested
> with more than 20 different operating system / compiler / processor combinations.
>
> --Johan Råde
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

-- 
Lorenzo `Gigi Sullivan' Cavallaro <sullivan_at_[hidden]>
GPG key at http://security.dico.unimi.it/~sullivan/sullivan.asc
Until I loved, life had no beauty;
I did not know I lived until I had loved. (Theodor Korner)
See the reality in your eyes, when the hate makes you blind. (A.H.X)

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