Operators as function arguments?

Falk Henrich schreibmalwieder at hammerfort.de
Sat Mar 24 02:59:59 PDT 2007


Chris Nicholson-Sauls wrote:
> None, frankly.  Although, with the upcoming macros feature, you might be
> able to do something like this:
> 
> macro binop (Type, Op) {
>    (Type x, Type y) { return x Op y; }
> }

That would be a killer feature that's useful for a lot more than my
"operator as argument" problem.

Falk



More information about the Digitalmars-d-learn mailing list