Boost logo

Boost :

Subject: Re: [boost] [endian] Some suggestions
From: Thijs (M.A.) van den Berg (thijs_at_[hidden])
Date: 2016-04-12 12:07:55


> On 12 Apr 2016, at 17:49, Bjorn Reese <breese_at_[hidden]> wrote:
>
>> On 04/12/2016 04:51 PM, Peter Dimov wrote:
>> Bjorn Reese wrote:
>>
>>> While the interoperability problems surrounding NaN payloads are
>>> caused by serialization, ...
>>
>> I'm not sure that this is true. If the sender and the receiver are both
>> IEEE, the serialization and the deserialization cannot be the source of
>> interoperability problems because they just transfer the bits from point
>> A to point B.
>
> The purpose of serialization is to transform values between C++ types
> and types defined by a serialization protocol. If the protocol designer
> opts for IEEE 754 floats, then the protocol should specify all aspects
> that IEEE 754 does not; this includes endianness and the semantics of
> NaN payloads.
>
Yes.
When the source is fully specified you will then also need a fully specified target representation (which might not be native), and specify rules on how to convert source to target in case the mapping is not unique. Conversion rules could use the same concepts as one would use between C++ types.

I think this is very useful functionality, but I think this would be better named "number representations" than "endian"


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk