std.signals regressions

Damian damianday at hotmail.co.uk
Sat Jul 13 16:36:28 PDT 2013


On Friday, 12 July 2013 at 22:35:06 UTC, David wrote:
> Am 12.07.2013 23:47, schrieb Robert:
>> I just finished a new implementation, replacing the template 
>> mixin with
>> a string mixin. I also changed the name from signals2 to 
>> signal. You can
>> find it here:
>> 
>> https://github.com/phobos-x/phobosx/blob/master/source/phobosx/signal.d
>> 
>> All unittests pass, you don't need any patched compiler. I 
>> still have to
>> add some more checks and do some polishing, I will also put it 
>> in the
>> dub registry. But you seem to have an urgent need, so feel 
>> free to try
>> it out immediately - Be my pre-alpha Tester :-)
>> 
>> Best regards,
>> 
>> Robert
>> 
>> 
>
> Bad timing, just got "our"[1] own implementation.
> If I have time, I'll play around with it! Thanks for the great 
> work,
> maybe we can get something working into phobos...
>
>
> [1]https://github.com/AndrejMitrovic/new_signals

Having tried this I can't get ref parameters to work as function 
arguments, are they supported?

Example:

struct KeyEvent {}

public Signal!(ref KeyEvent) onKeyDown;

connect, emit ...

public void keyDownHandler(ref KeyEvent keyEvent) { }

Works fine without ref.


More information about the Digitalmars-d mailing list