.tupleof.stringof

Christopher Wright dhasenan at gmail.com
Wed Jan 21 19:47:32 PST 2009


Christopher Wright wrote:
> Check this out!
> class Foo { int someField; }
> pragma (msg, Foo.tupleof[0].stringof); // int
> pragma (msg, Foo.tupleof[0].mangleof); // someField
> 
> Why is this? It's counterintuitive.

Oops, no. mangleof does report the mangled name of the input string. 
It's just that mangleof(i) == i, so my testing incorrectly reported the 
right result.

Now I need to find a CTFE-able demangle. I think ddl has one.


More information about the Digitalmars-d-learn mailing list