== Quote from Brad Roberts ([email protected])'s article
> The auto-generated code from the library is the same code the compiler
> would end up generating. You can test that theory by comparing the
> produced assembly for a C vs a D implementation.
If the generated code are same, and it's in the std library, which means no
difference in the backend.
Then I'd rather write:
struct A
{
bool flag1: 1;
bool flag2: 1;
// uint "", 6; // this should be auto-magically generated by the
compiler
}
(the code is more clear, and the compiler can give better message).
than this:
struct A
{
mixin(bitfields!(
bool, "flag1", 1,
bool, "flag2", 1,
uint, "", 6));
}