In c++,declaring a named variable as a reference, that is, an alias to an already-existing object or function.
That is to say,any operation on the reference equals to operations on the orinal object refereced by you.
Therefore,once you write something like:
int foo=1;
int &bar=foo;
int a;
a=bar;//it's actually copying the foo,bar is just a alias.
So copying the reference itself is just copying the original object.
As a supplement, once there exists a class member of reference type,the implicit default copy/move assignment will be =deleted
. Because if it's allowed,after the copy assignment,the class member of reference type will not chage its orinally referecing object, which is not what we actually want and probably cause ambiguity .
However ,the copy/move constructor is allowed,because they are just initializing,not copying,which does not cause ambiguity.