I am reading a book about C++ and more precisely about the operator overloading.
The example is the following:
const Array &Array::operator=(cons
There is no need to avoid this, unless the book is aimed at programmers that commonly write (x=y)=z when they mean x=y=z. In practice, nobody in their right mind writes that, so the precaution is entirely unnecessary. It also forbids some other terse constructs, such as (x=y).nonConstMember(), that hardly anyone writes but that might be useful in some contexts (although they shouldn't be over-used).
@ybungalobill is right, get a better book.