Is std.demangle usable?
Andrej Mitrovic
andrej.mitrovich at gmail.com
Wed Dec 22 18:54:11 PST 2010
Okay, this works:
import std.stdio;
import std.demangle;
import std.traits;
void main()
{
void test()
{
}
auto mystr = "_D3std5stdio4File17LockingTextWriter11__T3putTAaZ3putMFAaZv";
writeln(demangle(mystr)); // void
std.stdio.File.LockingTextWriter.put!(char[]).put(char[])
}
So maybe mangledName!() doesn't work properly.
On 12/23/10, Andrej Mitrovic <none at none.none> wrote:
> import std.stdio;
> import std.demangle;
> import std.traits;
>
> void main()
> {
> void test()
> {
> }
>
> auto mystr = mangledName!(test); // -----------
> demangle4mainFAAyaZv4testMFZv
> writeln(demangle(mystr)); // writes back
> demangle4mainFAAyaZv4testMFZv
> }
>
> Also, the example code is broken in
> http://www.digitalmars.com/d/2.0/phobos/std_demangle.html
>
More information about the Digitalmars-d
mailing list