Boost logo

Boost :

Subject: Re: [boost] Interest in serialization library
From: iwg molw5 (iwg.molw5_at_[hidden])
Date: 2012-12-28 04:13:03

On Fri, Dec 28, 2012 at 1:45 AM, Andrey Semashev

> I see. It would be great if the library provided a way to define the
> serialization format as a grammar separately from the object
> definition - perhaps similarly to how Boost.Fusion adapts structs or
> in pure C++ syntax without macros in Boost.Spirit style; whichever
> works best. The serializable_specification approach can be useful for
> tricky cases but as a general solution it doesn't provide a good
> readable description of the target format.

I agree - I've toyed with similar approaches, I have not yet found one
I'm satisfied with.

> One more question. Does the library provide a portable binary format
> for floating point numbers?

No, nothing reliable. Technically the little_endian and big_endian
wrappers do use a floating-point host endianness flag,
FRAMEWORK_HOST_ENDIANNESS_FLOAT, and adjust their behaviour accordingly,
however the conversion implementations are extremely rudimentary at the
moment. Ideally I'd like tie the implementation of those wrappers to
Boost.Endian or similar; I don't believe a library specific solution is
suitable here.

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