Namespace:

You mean like this?
----
void foo(T)(extern(C) void function(T*) func) {
                
}
----

That prints: Error: basic type expected, not extern     

In theory that's correct, in practice the compiler refuses that, it's in Bugzilla, so try to define the type outside the signature (untested):

alias TF = extern(C) void function(T*);

void foo(T)(TF func) {}

Bye,
bearophile

Reply via email to