After initializing the link, for example. via
int i = 42; int& r1 = i; int& r2 = ReturnAReference(); int& r3(i); int& r4{i};
it becomes an alias, that is, a different name for the object with which it was initialized. This is not another integer. Note that in the C ++ standard language, an object is simply a storage area, not necessarily an instance of a class.
As a link is an alias, if you work with a link, you will work with the original object (the one that was initialized):
int i = 42; int& r = i;
Statement
int normalVariable = ReturnAReference();
introduces a new object of type int and the name for this object: normalVariable . This object is initialized with the object returned by ReturnAReference() , which means that the value of the returned object is copied to a new object called normalVariable .
Statement, on the other hand
int& referenceVariable = ReturnAReferene();
introduces a new name for the object returned by ReturnAReference() .
If your function returns a link without an int reference, for example int ReturnAnInt(); operator
int& r = ReturnAnInt();
will become illegal, since the object returned by this function is temporary, which lives only until the end of this line (in this case). In the next line, the name r will refer to an object that no longer exists, so it was made illegal to link non-constant references to temporary objects.