Any way to get the name of a function?
Andrej Mitrovic
andrej.mitrovich at gmail.com
Wed Jul 6 19:54:43 PDT 2011
This is the closed I could get:
auto funcs = tuple
(
[&snippet_text, &snippet_text_extents, &drawStroke, &drawFill,
&drawText, &drawTextAlphaBlock, &drawMask, &drawWithSource,
&drawWithSource2],
["snippet_text", "snippet_text_extents", "drawStroke", "drawFill",
"drawText", "drawTextAlphaBlock", "drawMask", "drawWithSource",
"drawWithSource2"]
);
foreach (func, name; lockstep(funcs[0], funcs[1]))
{
func(args);
writeln(name);
}
But I had to manually set the names, that's no good.
More information about the Digitalmars-d-learn
mailing list