|
Boost : |
From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2007-12-30 12:36:12
----- Mensaje original -----
De: Robert Ramey <ramey_at_[hidden]>
Fecha: Domingo, Diciembre 30, 2007 6:20 pm
Asunto: Re: [boost] A question regarding serialization lib
Para: boost_at_[hidden]
> Hmmmm - a very interesting question I've never considered.
>
> All the serialization tests do the following: create a structure,
> serialize to a file, load the file to a new structure and check
> for equality.
>
> I would expect that in your test text1.doc would be identical to
> text2.doc.
>
> UNLESS you have have floats/double in your classes. In general, it
> cannotbe guarenteed that there is a one-to-one correspondence
> between floatiing point values as represented by binary in ram
> to text numbers representedas decimal based text. So in this case
> I would expect text1.doc to not be identical to text2.doc.
>
> There may be other cases, but that's all that occurs to me right now.
Off the top of my hat, I think there's another case where
text1 is not identical to text2, namely when using hashed
containers: If a rehash occurs during container population,
the resulting traversal order won't be the same as the original.
I don't know if this applies to the OP scenario.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk