delegate with optional parameters

Rene Zwanenburg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Apr 3 04:23:47 PDT 2017


On Monday, 3 April 2017 at 05:00:15 UTC, Inquie wrote:
> Yes, but they are really not any different. They only look 
> different. A field can be a function just like a method because 
> they look exactly the same except on is in a vtable and the 
> other is in the fields memory. But both point functions.

It should be possible to create a wrapper struct around your 
'overloads' with an opDispatch which selects the right delegate.


More information about the Digitalmars-d-learn mailing list