I was wondering if I could create my own property in a way that can be used the same way as something like "T.sizeof". Right now I have the following to replace length:

uint length32(T)(T[] array)
{
    return cast(uint)array.length;
}

I want something similar to be able to do the following:


uint size = T.sizeof32;

The closest I can think of is doing:

uint size = sizeof32!T


That's the best I can do, which is fine but I was wondering if there's any other way around that?

Reply via email to