On 11/21/12, Jack Applegame <jappleg...@gmail.com> wrote: > This problem appears also in std.signals. > There is no possibility to use functions with ref parameters as > signal handler. > > import std.signals; > > class Foo { > mixin Signal!(int); > } > class Bar { > void handler(ref int a) {} > } > > void main() { > Foo foo = new Foo; > Bar bar = new Bar; > foo.connect(&bar.handler); > }
Known problem, no known proposals or solutions. But there are workarounds, e.g. if you're writing your own signals implementation you could use a function type instead of a lone type, e.g.: mixin Signal!(void function(ref int));