3 ms·
They're not fundamentally different. The passing semantics are the same in both cases, the variable bound within the body of swap will not be the same variables
by TazeTSchnitzel 12y ago
They're not fundamentally different. The passing semantics are the same in both cases, the variable bound within the body of swap will not be the same variables we are passing it. The difference is that the value being passed is a pointer in the second case.