Ticket #2311 (closed Feature Requests: fixed)
any::operator= should have by-value argument
|Reported by:||niels_dekker||Owned by:||nasonov|
When a copy assignment operator is implemented simply by doing copy-and-swap, it should pass its argument by value, instead of doing the copy inside the body of the function, to allow the compiler to do copy elision. As was discussed at the Boost developer mailing list, Improving the assignment operators of various Boost types.
So please consider the attached patch.