Fully qualified class name at compile-time
Jarrett Billingsley
kb3ctd2 at yahoo.com
Fri Apr 11 06:43:20 PDT 2008
"Matthias Walter" <walter at mail.math.uni-magdeburg.de> wrote in message
news:ftn3gh$urd$1 at digitalmars.com...
> Hello,
>
> I'd like to get the fully qualified name of a class for some CTFE:
>
> `MyClass.classinfo.name`
>
> returns the expected result, but is not evaluated at compiletime.
>
> I already thought about demangle(MyClass.mangleof) but this seems to be
> bad coding style and I also didn't find a demangle-function in Tango yet.
Sadly that's about the best you can do. See:
http://www.dsource.org/projects/ddl/browser/trunk/meta/demangle.d
For an implementation that will demangle stuff at compile-time and allow you
to get FQNs.
More information about the Digitalmars-d-learn
mailing list