www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Function Names as Strings

reply ore-sama <spam here.lot> writes:
Is there something similar in D?
http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Function-Names.html#Function-Names
Oct 16 2008
parent Don <nospam nospam.com.au> writes:
ore-sama wrote:
 Is there something similar in D?
 http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Function-Names.html#Function-Names

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 SomeModule.foo(int, double)"); }
Oct 17 2008