Boost logo

Boost :

From: Olaf van der Spek (olafvdspek_at_[hidden])
Date: 2006-03-28 11:21:14


On 3/28/06, Beman Dawes <bdawes_at_[hidden]> wrote:
>
> "Olaf van der Spek" <olafvdspek_at_[hidden]> wrote in message
> news:b2cc26e40603280426m1c14752do996f84adf0455ab6_at_mail.gmail.com...
> > Hi,
> >
> > When reading/writing binary streams, you often need to read/write an
> > (unaligned) integer in big, little or native endian. Is there support
> > for this in Boost?
>
> Back in 2000 there was considerable Boost discussion of endian integers.
> Darin Adler and I and some others contributed.
>
> We came up with a set of requirements that implied a surprisingly large
> feature set. 1, 2, 3, 4, 5, 6, 7, and 8 byte integers and unsigned are
> required. Unaligned for all, aligned for 2, 4, and 8 byte flavors. Both POD

Isn't aligned when you have unaligned just an optimization?

> and non-POD flavors were requested.

How does POD apply to this?

> Must work correctly regardless of char
> being signed or unsigned. Must work correctly even when internal and
> external number of bits differ.
> No manual configuration. No optimization
> (supposed optimizations turned out to be pessimizations all too often
> between CPU's, compilers, compiler versions, or even when a compiler switch
> was changed).
>
> IIRC, almost everyone in the discussion had a set of roll-your-own classes,
> but none were Boost ready.

And no work was done after the discussion?
That's a shame, because I think it's really needed.


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