disable all member function calls for rvalues?

Kagamin spam at here.lot
Fri Dec 18 07:51:27 PST 2009


Kagamin Wrote:

> Andrei Alexandrescu Wrote:
> 
> >     b.a = A.init;
> 
> The problem here is not in passing temporaries as this, the problem is that property assignment is ambiguous with opAssign called on the property's return value. Your proposed solution seems unrelated to the problem.

I think, possible solution is to disallow assign operations on the return value: =, +=, *=, ~=, ++ etc, but read operations should be allowed and functions should be callable by their symbolical names.



More information about the Digitalmars-d mailing list