www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Short list with things to finish for D2

reply Kyle <none dontemail.com> writes:
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
Nov 19 2009
parent Kyle <none dontemail.com> writes:
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 :)
Nov 19 2009