Boost logo

Boost :

From: Paul Giaccone (paulg_at_[hidden])
Date: 2006-03-15 05:46:16

Paul A Bristow wrote:

>As far as I recollect, VS 7.1 also worked correctly for all FP types, so I
>would surmise that the number of digits used for serialisation is
>insufficient? For double, it should be 17. There do appear to be 17
>digits, so I am slightly puzzled.
> I:\boost-06-01-13-0500\boost\archive\basic_text_oprimitive.hpp(124)
>os << std::setprecision(std::numeric_limits<double>::digits10 + 2);
>and I suggest that this should be:
>os << std::setprecision(2 + std::numeric_limits<double>::digits *
Yes, fair enough, but that wouldn't make any difference in this case.
The problem is clearly with the *de*serialisation.

Tracing back through the functions, this seems to be the function (in
basic_text_iprimitive.hpp) that reads doubles from XML files:

    void load(T & t)
        is >> t;

This suggests that it is a broken feature of Microsoft's operator>> for
doubles read from filestreams.


Boost list run by bdawes at, gregod at, cpdaniel at, john at