Thanks for the explanation!

Now I know that I haven't misunderstood completely... :-)

Cheers
Lars

2011/3/10 Ion Gaztañaga <igaztanaga@gmail.com>
El 10/03/2011 7:58, Lars Hagstrom escribió:

Hi all,

I'm having a problem compiling some code with boost 1.46 that was
compiling fine with 1.36 to 1.43 (or thereabouts). It appears that this
is somewhat related to the use of Boost.Move in the Boost.Interprocess
library.
I have tried to read up a bit on Boost.Move, but have failed to quite
understand what of it applies to me.

You are right. The new emulation (which is what Boost.Move will implement) is more efficient in several cases but forces you to define the assignment operator. Full explanation here:

http://igaztanaga.drivehq.com/libs/move/doc/html/move/two_emulation_modes.html#move.two_emulation_modes.optimized_mode


Is this the way it is meant to be? I was fine with the
compiler-generated ones before...

Yes, it was, but suboptimal for copyable and movable classes like containers. In the old approach if class A was movable and copyable, this would call the copy assignment instead of the move assignment

A a (...);
a = A();

...and you could not reuse A()'s string memory in a. If your class implements copy assignment taking by value, this limitation does not arise, but value-taking copy assignment is suboptimal for containers. Sorry for the breaking change.

Best,

Ion
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users