Subject: Re: [boost] [gsoc][RFC] Pointer Plus Bits
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-07-27 07:36:42
Brian Bartman wrote:
> bit_align< std::size_t> -> increases the offset of the next
> field to an offset which is divisible by the supplied value
> unless the current index is divisible by the supplied value
> then there is no increase.
"align" would be a better name. "Bit" is useless in context.
When you document this mechanism, I suggest wording more like, "Ensures the offset of the next bit field is divisible by the supplied value."
> filler<std::size_t> -> bits to be skipped.
Instead of "filler," how about "padding," "reserve," or even "ignore?"
> member<typename, typename, std::size_t> -> this is a basic
> bitfield parameters it takes are the type the bitfield is to
> return, a naming type and the width of a bitfield flag<typename>
> -> boolean version of member.
I think "field" would be a better name. "Member" is too suggestive of classes and the parts in this context are called "bit fields," right?
> storage<typename> -> uses the supplied type for internal storage.
I presume you mean that dictates the underlying storage type for the entire bitfield_tuple. I'm not sure I like that interface. I think two distinct types, one that computes the storage type and one that requires it (as the first template argument) might be better. That implies, of course, creating distinct names. Perhaps "bitfield_tuple" and "typed_bitfield_tuple?" (The latter is rather verbose, but no more so than "storage<some_type>" in the current scheme.)
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk