Call a function with a function pointer
Namespace
rswhite4 at googlemail.com
Thu Oct 10 08:49:45 PDT 2013
On Thursday, 10 October 2013 at 14:44:00 UTC, Dicebot wrote:
> 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.
That works. Thanks.
More information about the Digitalmars-d-learn
mailing list