Why must bitfields sum to a multiple of a byte?

Era Scarecrow rtcvb32 at yahoo.com
Tue Jul 31 11:21:11 PDT 2012


On Tuesday, 31 July 2012 at 17:17:43 UTC, Timon Gehr wrote:

> This is obviously a mistake in the bitfield implementation. 
> What else could be concluded from the error message:
>
> std\bitmanip.d(76): Error: shift by 32 is outside the range 
> 0..31
>
> Requesting a 32 bit or 64 bit member on the other hand is not a 
> mistake, and it is not useless, therefore the analogy breaks 
> down.

  Well curiously it was easier to fix than I thought (a line for a 
static if, and a modification of the masking)... Was there any 
other bugs that come to mind? Anything of consequence?


More information about the Digitalmars-d-learn mailing list