rvalue reference in C++

An rvalue reference is a reference that will bind only to a temporary object. 
Prior to C++11, if you had a temporary object, you could use a "regular" or "lvalue reference" to bind it, but only if it was const:
```
#include <iostream>
#include <string>
using namespace std;
 
string getName() {
    return "abc";
} 
 
int main()
{
    const string& name1 = getName(); // ok
    string& name2 = getName(); // Not ok
}
```
The intuition here is that you cannot use a "mutable" reference because, if you did, you'd be able to modify some object that is about to disappear, and that would be dangerous. Notice, by the way, that holding on to a const reference to a temporary object ensures that the temporary object isn't immediately destructed. This is a nice guarantee of C++, but it is still a temporary object, so you don't want to modify it.
In C++11, however, there's a new kind of reference, an "rvalue reference", that will let you bind a mutable reference to an rvalue, but not an lvalue. In other words, rvalue references are perfect for detecting if a value is temporary object or not. Rvalue references use the && syntax instead of just &, and can be const and non-const, just like lvalue references, although you'll rarely see a const rvalue reference (as we'll see, mutable references are kind of the point):
```
const string&& name = getName(); // ok
string&& name = getName(); // also ok - praise be!
```