digitalmars.D.learn - Fully qualified class name at compile-time
- Matthias Walter (7/7) Apr 11 2008 Hello,
- Jarrett Billingsley (6/12) Apr 11 2008 Sadly that's about the best you can do. See:
- BCS (2/16) Apr 11 2008 take a look at ".stringof", I /think/ it can be used for this.
- Leonard Dahlmann (2/19) Apr 11 2008 ".stringof" doesn't return the fully qualified name.
- BCS (2/8) Apr 11 2008 Well than I think i was wrong. Crud.
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. best regards Matthias Walter
Apr 11 2008
"Matthias Walter" <walter mail.math.uni-magdeburg.de> wrote in message news:ftn3gh$urd$1 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.
Apr 11 2008
Matthias Walter wrote: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. best regards Matthias Waltertake a look at ".stringof", I /think/ it can be used for this.
Apr 11 2008
BCS Wrote:Matthias Walter wrote:".stringof" doesn't return the fully qualified name.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.best regards Matthias Waltertake a look at ".stringof", I /think/ it can be used for this.
Apr 11 2008
Leonard Dahlmann wrote:BCS Wrote:Well than I think i was wrong. Crud.take a look at ".stringof", I /think/ it can be used for this.".stringof" doesn't return the fully qualified name.
Apr 11 2008