On Tuesday, 24 December 2019 at 10:40:16 UTC, Mike Parker wrote:
struct S {}
void f1(S s) {}
void f2(S s) {}

alias Func = immutable(void function());

immutable Func[2] funcs = [cast(Func)&f1, cast(Func)&f2];

Though, it's not clear to me wy the one requires casting the pointer type and the other doesn't.

Because typeof(&f1) == void function(S)

Reply via email to