Signals/Slots only with classes
Basile B.
b2.temp at gmx.com
Sat Oct 17 16:36:37 UTC 2020
On Saturday, 17 October 2020 at 16:22:39 UTC, Johann Lermer wrote:
> Hi everybody,
>
> I'm just fiddling around with signals and slots and fell over
> this nasty bug:
>
> (copied from std.signals)
> "Slots can only be delegates formed from class objects or
> interfaces to class objects. If a delegate to something else is
> passed to connect(), such as a struct member function, a nested
> function, a COM interface or a closure, undefined behavior will
> result."
>
> Is there any chance, that this bug is fixed in the near future
No. std.signals is old, old-fashioned but is still there because
there's no proposals to replace it and the standards for std are
high.
std.signals is there not because it's good but rather for
historiacal reasons.
> ore is it something we have to live with?
Likely. But you can work on something better and use it.
More information about the Digitalmars-d
mailing list