UFCS with static delegates

DigitalDesigns DigitalDesigns at gmail.com
Sat Jun 9 00:18:41 UTC 2018


allow use of UFCS for delegates

struct X
{
    alias D = int function(X);

    static D F;
}

Then given x, x.F(); which translates in to X.F(x);

Just because F is local to X shouldn't prevent UFCS from working 
on it. If F was global then we should use it and it would work 
fine, it's actually safer this way since F is local to X and 
cannot be hijacked.



More information about the Digitalmars-d mailing list