would the compiler handle std::move for me?

I notice that C++0x would include semantic move, would the compiler handle the move for the users?Or should we explicitly ask the compiler to do it for us?

should we code like this
1
2
3
//Mat are some kind of matrix container
Mat_<int> A = something;
A = std::move(A.inv()); // do the inverse transform 


or
1
2
3
//Mat are some kind of matrix container
Mat_<int> A = something;
A = A.inv(); // do the inverse transform 

and left everything for our powerful compiler?

Thanks a lot

ps : i am using gcc4.6 with codeBlock 10.05
Last edited on
You would want

 
Mat_<int> A( something.inv() );


and the move constructor will be called implicitly if it can.


Thanks, would those standards containers and primitive types make it transparent?
Maybe I should ask this question until the standard come out?
Last edited on
Topic archived. No new replies allowed.