
16 Nov
2009
16 Nov
'09
12:46 p.m.
On Sep 8, 2009, at 5:52 AM, Ion GaztaƱaga wrote:
We need a third alternative: a new overload set that maintains "const T &" and properly catches non-const rvalues.
I think we have it: define one copy assignment operator in terms of swap. Copy elision makes it nearly as fast as a move, and we don't get an operator=(T&) infection in derived classes. I have no problem with requiring move-enablers to supply a swap. -- David Abrahams BoostPro Computing http://boostpro.com