On 03/04/2010 02:44 PM, Bane wrote:

This can be solved if the compiler warns when an assignment is from a
variable to the same one.

x = x; // error: assignment has no effect

Nice and useful.

struct A {
    int i;
    void opAssign(A a) {
        i = a.i + 1;
    }
}

why not?

Reply via email to