I just posted the latest article in the series on C++11, covering rvalue references and move semantics--using move constructors and move assignment operators to solve the problems C++ has had with unnecessary copies of temporaries: Rvalue References and Move Semantics in C++11 - Cprogramming.com
Comments and suggestions welcome as always!



2Likes
LinkBack URL
About LinkBacks



Arguably, move semantics make the language *easier* for beginners, in the sense that you don't have to learn some weird way of returning a value for the sake of efficiency. (You eventually need to learn a move constructor and move assignment operator to use it on your own classes, but you'd probably get to that once the student is much more experienced.)
I used to be an adventurer like you... then I took an arrow to the knee.