Function Names as Strings

Don nospam at
Fri Oct 17 01:57:23 PDT 2008

ore-sama wrote:
> Is there something similar in D?

No. Unless you count declaring a local variable and using my NameOf module.

module SomeModule;
import meta.NameOf;

void foo(int z, double q) {
   int dummy;
   const char [] funcname = prettyNameOf!(dummy);
   static assert(funcname == "void, double)");

More information about the Digitalmars-d-learn mailing list