"Era Scarecrow" <rtcvb32@yahoo.com>

>  Then doesn't it seem like we're missing a potentially important piece of the puzzle for mixins and templates? very likely my modified template will include you including the same variable twice, but if someone gets lazy then it may not work.
>
>  mixin(bitfieldsOn!("SomeVariable", SomeVariable, /*stuff*/));
>  // or
>  mixin(bitfieldsOn!("SomeVariable", variable type, /*stuff*/));

Hmm. You can ask for just the name as a string (so, qualified or not, as the user wish) and include a test for the type of the passed name.

inside bitfieldsOn:

    mixin("
static if is(typeof("~name~"))
        alias typeof(" ~ name ~ ") NameType;
    else
        static assert(false, `bad name given to bitfieldsOn:"~name~".`);
")

Untested, I'm on a pad right now.