Get name of alias parameter at compile time?

Jacob Carlborg doob at me.com
Wed Oct 14 00:23:30 PDT 2009


On 10/14/09 06:36, dsimcha wrote:
> Is there a way to get the name of an alias parameter at compile time?  For
> example:
>
> void doStuff() {
>      // Do stuff.
> }
>
> void templ(alias fun)() {
>     writeln(fun.stringof);  // Prints doStuff.
> }

Do you want that to print "fun" instead of "doStuff"?



More information about the Digitalmars-d mailing list