digitalmars.D.learn - Function Names as Strings
Is there something similar in D? http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Function-Names.html#Function-Names
Oct 16 2008
ore-sama wrote:Is there something similar in D? http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Function-Names.html#Function-NamesNo. 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 SomeModule.foo(int, double)"); }
Oct 17 2008