Introduction to C++ 11 Series – Part 9, R-Value, L-Value, Move Semantics and Perfect Forwarding

Wednesday, April 3, 2013

Take a deep breath; this is a long post about one of the most important and most complex features of C++ 11. One of the most performance-boost features of C++ 11 is the new move semantics addition to the language. This feature is based on a new reference – an R-Value reference. In this post, I am going to explain what R-Value (and L-Value) is, why we need it, and how we can use it to enable move constructor & move assignment operator. We will also see the std::move function and talk about perfect forwarding and the std::forward...