Typecasting delegates

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 2 15:23:12 PDT 2017


On Fri, Jun 02, 2017 at 09:14:29PM +0000, Seiji Emery via Digitalmars-d wrote:
[...]
> For context, I'm working on an event system for a small hobby project,
> and it would be extremely useful if I could store delegates with
> different type signatures in the same storage container;
[...]

Adam Ruppe has done this, you can probably find your answers in his
code:

	https://github.com/adamdruppe/arsd/blob/master/eventloop.d

especially the parts related to addListener() and wrap().


T

-- 
Once bitten, twice cry...


More information about the Digitalmars-d mailing list