mixin template hide

2016-07-24 Thread Eppason via Digitalmars-d-learn
I use self-introspection and have the case for having to "remove" things from the mixin. Typically the mixin will mixin stuff that it does not exist in the scope it is trying to mix in, a great feature. But what I would like to do is tell the mixin not to mix in foo(), this allows me to

Type constructor with new size

2016-07-14 Thread Eppason via Digitalmars-d-learn
How can I create a new type NT from type T that such that NT is compatible with T when reduced to the size of T, but has size n? Another way to see it is that I would like to construct a type at compile time that has the same layout as another type but padded exactly by n - T.sizeof bytes. It