how to get fully qualified name of a template function (if possible at CT)

timotheecour thelastmammoth at gmail.com
Fri Aug 24 23:24:06 PDT 2012


related threads:
http://www.digitalmars.com/d/archives/digitalmars/D/learn/3530.html
from Don Clugston:
> I have implemented compile-time demangle metafunctions:
> static assert( prettynameof!(A)    == "class main.A" );
> static assert( qualifiednameof!(A) == "main.A" );
> static assert( symbolnameof!(A)    == "A" );

And also this: 
http://www.digitalmars.com/d/archives/digitalmars/D/Help_with_demangling_104520.html
> For an implementation that will demangle stuff at compile-time 
> and allow you
to get FQNs.
> http://www.dsource.org/projects/ddl/browser/trunk/meta/demangle.d

Although this is old (6 y) and will probably fail with 
invariant,shared,__gshared,inout(the new),etc.

So is there a better way now? That should be in phobos.


More information about the Digitalmars-d-learn mailing list