Type.stringof is removing alias and bitmanip
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Mon Dec 8 00:25:34 PST 2014
As a result, it is impossible to use thing like bitfields in
templates.
I'm trying to do something like
struct MySuperStruct(E) {
enum DataSize = ulong.sizeof * 8 - EnumSize!E;
import std.bitmanip;
mixin(bitfields!(
E, "kind", EnumSize!E,
ulong, "data", DataSize,
));
// More stuuuuuuufffffff \o/
}
But obviously, that won't work as mixins are using the real type
of E, and not E. I ran into that problem on other forms, and
always was able to work around it, but on that one, there is no
way around it.
More information about the Digitalmars-d
mailing list