inverse of std.demangle?

Adam D. Ruppe destructionator at gmail.com
Wed Jul 10 11:39:07 PDT 2013


On Wednesday, 10 July 2013 at 17:44:51 UTC, Timothee Cour wrote:
> * One use case is using it in shared libraries:
> user asks for a symbol via its demangled string representation 
> (which is most natural for user), then the string is mangled, 
> and then calls dlsym to retrieve the actual pointer to symbol 
> in the shared lib.

I think in this case, it would be better to use .mangleof anyway 
because you'll want that type safety. You could still compare a 
user inputted string to typeof(S).stringof if you want to choose 
one at runtime.

I'll look at the github in a bit, in the middle of a bunch of 
stuff now.


More information about the Digitalmars-d-learn mailing list