Displaying type of something

bearophile bearophileHUGS at lycos.com
Mon Mar 9 10:23:40 PDT 2009

Georg Wrede:
> When creating templates, it is sometimes handy to print the type of 
> something. Is there a trivial way to print it?

writeln("Typeof T is: ", typeid(typeof(t)));

(Try alternatives of that with a dynamic type, like a class).


More information about the Digitalmars-d-learn mailing list