How to declare an alias to a function literal type

ParticlePeter via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 12 07:41:02 PST 2016


I have a function type and variable and assign a function to it:

void function( int i ) myFunc;
myFunc = void function( int i ) { myCode; }

How would I declare an alias for void function( int i ) such that 
the case above would work like this:

// alias MF = void function( int i );  // not working
// alias void function( int i ) MF;  // not working

MF myFunc;
myFunc = MF { myCode };

Please, if possible, also show me where I should have found the 
answer (D Reference, Alis book, etc. )


More information about the Digitalmars-d-learn mailing list