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
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
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
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.
*closest
I'm tired. :/
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",
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