
Zitat von Brian Bartman <bbartmanboost@gmail.com>:
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.