Subject: Re: [boost] [move] auto-generated operator=
From: David Abrahams (dave_at_[hidden])
Date: 2009-09-08 03:53:14
on Tue Sep 08 2009, Ion GaztaÃ±aga <igaztanaga-AT-gmail.com> wrote:
> David Abrahams escribiÃ³:
>>> The fact that you need to add *both* const and non-const is strange,
>>> in my case, just definining the const version in the higher-level
>>> class was enough.
>> This was a weakness of all earlier approaches that was fixed by Adobe's
>> library; I *really* do not want to see it broken by Boost. It's not
>> always something you can work around. Consider putting a
>> movable-and-copyable type in std::pair; now constant pairs can't be
>> copied, which breaks everything.
> Well, maybe benefits don't outweigh problems... I added that overload so that
> assignment moves rvalues instead of copying them,
Can you explain what that means in detail, please?
> but maybe it's a limitation and we should just live with it. Or maybe
> the library needs a radical change, I really don't know what would be
> the best approach.
With more information about the problem, maybe I can offer an answer.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk