
Kim Barrett wrote:
1. std::size_t
This causes major problems for portable binary archives. I'm aware that portable binary archives are tricky (and perhaps not truly possible in the most general sense of "portable"). In particular, they require that users of such archives be very careful about the types that they include in such archives, avoiding all explicit use of primitive types with implementation-defined representations in favor of types with a fixed representation. So no int's or long's, only int32_t and the like. Floating point types add their own complexity.
I don't understand where all this talk of portable binary archives being tricky is coming from. I have such an archive, and it works. int32_t's of course don't work for the same reason that size_t doesn't work, they are typedefs that may map to different types on different platforms. Floating point formats _are_ tricky, though. There are ways to convert FP to portable external representation but I haven't used them; the hack of assuming IEEE and same endianness as an int32/int64 works for me so far.