[serialization] Deserialization of a float whose value is infinite throws an archive_exception ("stream error")
Hello,
using the Boost.Serialization library version 1.43, I saved to an XML
archive a float number which has a value of infinite; then loading
that XML file leads to a boost::archive::archive_exception,
exception.what() return "stream error". The source code to reproduce
the problem is the following:
#include
Luca wrote:
I resolved the issue by checking all the data preventing accurately any infinite value before it is saved to an xml archive, but I wonder if this problem belongs to the library itself or not.
This is a result of the fact that the serialization library text and xml are built upon text streams. an input stream can't read back a Nan which an output stream has written. Robert Ramey
Greetings, Luca
participants (2)
-
Luca
-
Robert Ramey