C++ Language/Indirection/RvalueReferences

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Traditional C++ considered the datatype int& to be a "reference to int".

Modern C++ refines that, so int& is now more precisely a "lvalue-reference to int". That is distinguished from int&&, which is a "rvalue-reference to int".

  1. Move-Semantics
  2. Moving from this
  3. Perfect Forwarding