Make alias parameter optional?

Robert Rouse robert.e.rouse at gmail.com
Sat Feb 25 10:48:37 PST 2012


Is it possible to do something like this?

void foo(T, T2, alias thing)(T a, T2 b) {
   // do stuff with a
   // call b (since b would be a delegate)
   // call thing if thing is given
}

I come from the Ruby world and I'm just playing around to see how 
much I can replicate of the "block" functionality that Ruby has.


More information about the Digitalmars-d-learn mailing list