Call a function with a function pointer

Dicebot public at dicebot.lv
Thu Oct 10 07:43:59 PDT 2013


On Thursday, 10 October 2013 at 14:40:09 UTC, Namespace wrote:
> Example? I do not use lambdas often.

void foo(T)(void function(T*) test)
{
}

extern(C) void bar(int*) { }

void main()
{
	foo( (int* a) => bar(a) );
}

I don't know to what extent IFTI can work here though.


More information about the Digitalmars-d-learn mailing list