https://forum.dlang.org/post/xhdzoofhirdhfgsgndvq@forum.dlang.org
Officially an empty parameter list in C is f(void), but it's easily conflated with the modern way f(), which currently gives an uninformative message:
--- test_kr_callback.d
import kr_callback;
extern (C) int callback() {
return 42;
}
void main()
{
run(&callback); // cannot pass argument `& callback` of type `extern (C) int function()` to parameter `extern (C) int function() fn`
}
--- kr_callback.c
typedef int(*fp)();
int run(fp fn) {
return fn();
}
https://forum.dlang.org/post/xhdzoofhirdhfgsgndvq@forum.dlang.org
Officially an empty parameter list in C is
f(void), but it's easily conflated with the modern wayf(), which currently gives an uninformative message: