Ok, I think you may have confusion about these two things:
& and *
& does not mean "reference" it means Address Of, which passes the address of the item on the right side. When passed with &, the values are passed by reference which means you can modify the values and they are reflected up the call stack.
* is the dereference operator, which returns the value of the item. Passing by value means you can do whatever you want in the function but its value is not reflected back up the call stack (the value reverts back to the original when the function exits).
*EDIT*
I may have been too quick to answer, see
this[
^] to see what the std::ref and std::cref really do and how it works.
I see you got the code from
here[
^]