Boost logo

Boost :

Subject: Re: [boost] [gsoc][RFC] Pointer Plus Bits
From: Brian Bartman (bbartmanboost_at_[hidden])
Date: 2010-07-26 09:54:45

On Mon, Jul 26, 2010 at 9:29 AM, Stefan Strasser <strasser_at_[hidden]>wrote:

> Zitat von Brian Bartman <bbartmanboost_at_[hidden]>:
>> what's the reason for letting the user control how the bits are stored?
>>> (specified order, filler<>, bit_align<>)
>>> 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.

> for example: the endian-ness of a 6-bit integer that is part of a
> bitfield_tuple is platform-dependent, isn't it?

I can set the endian-ness of the storage type itself by using Beman's
endains (this is thanks to my mentor Vicente Botet). However one can not
store a pointer inside of a the specially endian'ed type or I haven't tested
this case and I don't believe that it will work.

> _______________________________________________
> Unsubscribe & other changes:

Brian Bartman

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