Benjamin Thaut:

> The Type2Type template has a size of 0, thats why I'm 
> using that in the first place.

Almost. Maybe to allow addressability with pointers the minimal struct size in 
D is 1 byte (0-length fixed-sized arrays may require zero bytes on DMD and 1 
bit on LDC):

struct Type2Type(T){
        typedef T OriginalType;
}
static assert ((Type2Type!int).sizeof == 1);
void main() {}

Bye,
bearophile

Reply via email to