A reference is basically an alias, so the caller can have a variable that is an alias to the object's member variable. For example:
Code:
#include <iostream>
class X {
public:
X() : _val(0) {}
int& val() { return _val; }
private:
int _val;
};
int main() {
X x;
std::cout << x.val() << std::endl;
int& v = x.val(); // v is an alias for x._val
v = 1; // we change v, but this changes x._val
std::cout << x.val() << std::endl;
}
Yes, it initialises _val to v. v is a BigClass const reference, and that is not changed by the use of an initialisation list.
No. The idea is that if you have a const val_class object, you should not be able to logically modify its state. As such, you should only be able to call const member functions. But if a const member function returns a reference, the caller has a way of getting an alias to a member variable, and thus the caller can change the state of the object, even though it is supposed to be const!
A solution is to provide a pair of member functions. One is a const member function, and thus it returns a const reference to ensure that the state cannot be changed. The other is non-const, so it can just return a reference knowing full well that changing its state is to be expected.
Now, you have two constructors. One takes a BigClass object by const reference, the other takes a BigClass object by reference. However, you do not intend to modify the BigClass object passed. You only want to initialise your new object using this BigClass object. Consequently, the constructor that takes the BigClass object by reference should be discarded.