Type constructor with new size
Eppason via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Jul 14 18:10:09 PDT 2016
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 would be nice if the new type
is implicitly convertible to T.
This should be automatic and exact without overhead(pure, if you
will).
More information about the Digitalmars-d-learn
mailing list