Kyle Wrote: > Andrei Alexandrescu Wrote: > > > Yes; opBinary was just given as an example. Unary operators look like this: > > > > T opUnary(string op)(); > > Why not do > > T op(string op)(); // unary > T op(string op)(T rhs); // binary >
Whoops T op(string operation)(); // unary T op(string operation)(T rhs); // binary Maybe I just discovered the reason :)
