Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2020-09-26 00:52:26

Vinnie Falco wrote:

> So, I think at some point I will want to introduce options for
> serialization, and one of the options could be the treatment of integers
> outside the range ~+/-2^53. We could:
> 1. serialize them as-is (current implementation)
> 2. serialize them as the nearest representable IEEE double
> 3. throw an exception

I can't think of a reason to ever prefer #2 over #1. "As is" is already a
legitimate serialization of the nearest representable IEEE double, so #1 is
a valid implementation of #2, except it doesn't needlessly throw away

There's no need to innovate here; we already know that preserving 64 bit
integers is what's useful in practice.

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