why are Assign Expressions r-values?
Manfred Nowak
svv1999 at hotmail.com
Fri Apr 27 20:45:43 PDT 2007
BCS wrote
> however the expression could be used as an l-value
Because one can overload the assignment, your question has a
generalization:
given a function with exactly one "ref" or "out" parameter, why is this
function an r-value?
example:
int f( int i, ref int j){ }
now the semantics of an assignment like
f( a, f( b, c))= d;
should be clear.
-manfred
More information about the Digitalmars-d-learn
mailing list