On Tuesday, 20 November 2012 at 05:31:09 UTC, deadalnix wrote:
This make it impossible to only define a getter only when one want to return by reference.

If there isn't a setter, you don't change things.

If setter is present:
foo = foo + 1; // becomes: foo(foo() + 1);

If setter is not present:
foo = foo + 1; // becomes: foo() = foo() + 1;


If foo returns an rvalue, this is a natural error. If it returns ref, it works fine.

Reply via email to