Boost logo

Boost :

Subject: Re: [boost] [gsoc][RFC] Pointer Plus Bits
From: Stefan Strasser (strasser_at_[hidden])
Date: 2010-07-26 11:37:54


Zitat von Brian Bartman <bbartmanboost_at_[hidden]>:
>>>> The rationale behind allowing the user to control the bits is so that
>>> the
>>> bitfield_tuple can be used to construct packet header.
>>>
>>>
>> network packet header?
>> wouldn't that also require guarantees regarding endian-ness and alignment
>> between multiple bitfield_tuples (or a bitfield_tuple and another type) that
>> only a platform/compiler can give?
>>
>
> Yes. I'm still working on making it able to hold an entire packet at once.
> It's one of the future goals of the project. It was simple enough to add
> those features now so I did.

it seems to me that this is beyond the scope of a "bitfield tuple".
if I'd have to generate network packet headers I'd probably want a
stream/output iterator that I can use to output data which guarantees
endianness and alignment, not a data type that allows random access.
none of the other (aggregated) types of C++ give any guarantees about
the storage layout, not even PODs.


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