On Tuesday, 2 May 2023 at 13:06:41 UTC, ag0aep6g wrote: > void fun(alias method)(C c) > { > void delegate() dg; > dg.funcptr = &method; > dg.ptr = cast(void*) c; > dg(); > } This also works: void fun(alias method)(C c) { void delegate() dg = &c.method; dg(); }