typeof from TypeInfo

Steve Teale steve.teale at britseyeview.com
Sat Mar 20 01:35:37 PDT 2010


If I have an int say, I can declare another of the same

int a;
typeof(a) b;

If I have a TypeInfo instance ti, it would be nice to be able to do 
something similar, either special-case it, or have a property or method 
on Typeinfo.

typeof(ti) x;
ti.typeof y;

It's probably already there and I just haven't found it/worked it out yet.

Something of this sort would make the code in typesafe varadic functions 
much more succinct

_arguments[i].typeof a = va_arg!(arguments[i].typeof)(args);

Steve



More information about the Digitalmars-d mailing list