My understanding was that references, once assigned, could not be reassigned after. However, in A Tour of C++, Stroustrup has this bit of code:
int x = 2;
int y = 3;
int& r = x;
int& r2 = y;
r = r2;
This seems to imply that the reference r
can be reassigned after its initial assignment. Is the rule just that references can only be reassigned to other references or is there something else I'm missing?