Thread overview
Re: Any way to get the name of a function?
Jul 07, 2011
Andrej Mitrovic
Jul 07, 2011
Andrej Mitrovic
Jul 07, 2011
Andrej Mitrovic
July 07, 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.
July 07, 2011
*closest

I'm tired. :/
July 07, 2011
I could almost do it with string mixins if CTFE didn't suck massive balls.. barely anything works with ctfe, I don't see the use of mixins if i can't use them.