Boost logo

Boost :

Subject: Re: [boost] [boost::endian] Request for comments/interest
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2010-05-28 11:11:30


On 27 May 2010 15:01, Terry Golubiewski <tjgolubi_at_[hidden]> wrote:
> With the endian<endian_t, T> approach, the message can contain fields with
> varying endianess and the structure is self-documenting.
>

+1

Most uses I've seen involve different wire and memory models anyways,
since the latter can change while the former is fixed, so I'm not
convinced that the copy is always as terrible as has been implied.
I'd certainly never keep a BMP header structure in memory for very
long, for instance.

Also, the wire structures cannot maintain invariants, so having a
separate class is often useful even if its contents are essentially
identical to the wire version.


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