Portability of binary serialization of double/float type in C++
问题 The C++ standard does not discuss the underlying layout of float and double types, only the range of values they should represent. (This is also true for signed types, is it two\'s compliment or something else) My question is: What the are techniques used to serialize/deserialize POD types such as double and float in a portable manner? At the moment it seems the only way to do this is to have the value represented literally(as in \"123.456\"), The ieee754 layout for double is not standard on