On Wed, 16 Jan 2008 13:09:17 -0500 Lorenzo Cavallaro wrote:
I'm trying to unserialize a boost::archive::text_iarchive. The code used to work, but know (for no apparent reasons) it's calling terminate throwing the following exception.
terminate called after throwing an instance of 'boost::archive::archive_exception what(): stream error Aborted
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 2a) [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 -- Edward H. Hill III, PhD | ed@eh3.com | http://eh3.com/