Re: Any way to get the name of a function?

2011-07-07 Thread Kai Meyer
On 07/06/2011 08:47 PM, Andrej Mitrovic wrote: void foo(){}; void bar(){}; void main() { auto funcs = [&foo,&bar]; } I'm using this in a foreach loop and invoking each function with some predefined arguments. But I'd also like to extract the name of each function because each function does

Re: Any way to get the name of a function?

2011-07-06 Thread Jacob Carlborg
On 2011-07-07 04:47, Andrej Mitrovic wrote: void foo(){}; void bar(){}; void main() { auto funcs = [&foo,&bar]; } I'm using this in a foreach loop and invoking each function with some predefined arguments. But I'd also like to extract the name of each function because each function does so

Re: Any way to get the name of a function?

2011-07-06 Thread Daniel Murphy
Maybe something like TypeTuple!(foo ,bar) will work. "Andrej Mitrovic" wrote in message news:mailman.1452.1310006894.14074.digitalmars-d-le...@puremagic.com... > void foo(){}; > void bar(){}; > > void main() > { >auto funcs = [&foo, &bar]; > } > > I'm using this in a foreach loop and invoki

Re: Any way to get the name of a function?

2011-07-06 Thread Andrej Mitrovic
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.

Re: Any way to get the name of a function?

2011-07-06 Thread Andrej Mitrovic
*closest I'm tired. :/

Re: Any way to get the name of a function?

2011-07-06 Thread Andrej Mitrovic
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",

Any way to get the name of a function?

2011-07-06 Thread Andrej Mitrovic
void foo(){}; void bar(){}; void main() { auto funcs = [&foo, &bar]; } I'm using this in a foreach loop and invoking each function with some predefined arguments. But I'd also like to extract the name of each function because each function does some image processing and then I save that image