
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 10 August 2009, Ion Gaztañaga wrote:
David Abrahams escribió:
In both cases the temporary should get RVO'd (i.e. the copy should be elided) on all modern compilers. If you can find a modern compiler where Boost.Move does not RVO, then its design needs to be fixed.
Does Boost.Move support moveable-but-not-copyable types? Could this cause compile errors for such types when compiling with optimization turned off?
Yes in case of constructors but not with assigments:
clone_ptr<MyClass> p;
for(){ p = return_rvalue(); }
Although I guess that this missed optimization might not be so important. The same could be applied to containers
//With old approach, copied instead vector.push_back(return_rvalue());
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkqAN58ACgkQ5vihyNWuA4Vv+ACgzMVs/IUV9dkC5UZYfkGF5Fa9 AwkAoKxCExgH7lvJULK/iRr6TfArQ3Cs =xP5S -----END PGP SIGNATURE-----