
2010/4/24 Ion Gaztañaga <igaztanaga@gmail.com>:
On 22/04/2010 15:57, cg wrote:
I think VC10 should activate rvalue reference by default. And I have tried to compile the code with and without BOOST_HAS_RVALUE_REFS defined, but got the same error.
However I think VC10 move semantics are broken, e.g. this does not compile
//Movable is not copyable, private copy constructor movable function() { movable m; return boost::move(m); }
int main() { //ERROR: error C2248: 'movable::movable' : //cannot access private member declared in class 'movable' movable m(function()); return 0; }
I imagine boost::move is written with rvalue references v1 and therefore doesn't work with vc2010, which implements v2. Is there a reason why boost has to implement its own version of move? Every compiler/library supporting rvalue references should have std::move which will do the right thing.