On 04/12/2016 02:28 PM, Peter Dimov wrote:
That's true but I still don't see why the Endian library has anything to do with it. Its job is to put back the bits in your float the way they were written; if the compiler then replaces the bits with something else, there's nothing the library can do. The library should give you a float that is the same as the hex float literal with the same bits that were written; it could do nothing more.
Beman said that he wanted to submit a proposal for C++ standardization to unveil the various intricacies of floating point numbers. That is why I mentioned NaN payloads in the first place. I do not see them as showstoppers for the inclusion of floats in Boost.Endian. That said, binary serialization protocols are going to be some of the major "customers" of Boost.Endian, so I find the line between endian and serialization a bit blurred. While the interoperability problems surrounding NaN payloads are caused by serialization, Boost.Endian with float support is going to make it easier to make such mistakes.