How can I make my class immune to the “auto value = copy of proxy” landmine in C++?
Reduce the damage by adding “&&” to the end of the proxy class’s operator= (And operator +=, -=, etc.) Took me a lot of experimenting but I eventually found a way to mitigate the most common case of the problem, this tightens it so you can still copy the proxy, but once you’ve copied it … Read more