Appendix A. A Painless Introduction to Rvalue References (C++11)

Programming with rvalue references is a technique for optimizing the speed of your programs. It’s closely related to move semantics, which replaces copying of data with data transfers. Think of how much faster a piece of code can be if it lets an object steal ownership of data rather than copying that data out. (If it isn’t immediately clear how this can speed up your programs, don’t worry. This appendix explores the concept in greater depth.)

C++11 builds support for rvalue references into the STL, which can cause your programs to run faster even if you don’t know about this feature. Adding support for rvalue references to your own code can optimize your programs further, sometimes ...

Get C++ for the Impatient now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.