You need to distinguish between passing by const reference and passing
by reference. When you pass by reference the original is available for
modification, but when passing by value this is not the case.
It is normal to pass large (substantially larger than a pointer in
storage requirement) values by const reference and small objects get
passed by value. Indeed it is more efficient at the micro-level to pass
by value as long as the copying cost is low.
If you want to modify the original (sometimes called an out parameter)
it is necessary to either pass the address explicitly (by using a
pointer) or by using a plain pointer. The later method is preferred in C++.
I think a compiler is allowed to optimise a pass by value into a const
reference as long as the resulting code will have the same visible
results (this is allowed under what id called the 'as if' rule (the
compiler can apply any optimisation that will not change the
output/behaviour (in the widest sense) of the program.
Francis