Daniel Keep Wrote: > Maybe the compiler could rewrite the above as: > > auto t = a.b; > t.c = 3; > a.b = t; > > Unless it can prove it doesn't need to. Same solution as to the op= > conundrum.
I think b should be const if it is a temporary object. And the compiler will tell you that a.b.c is read only. Otherwise, don't make it look like a property: a.createNewB().c = 3;
