3 ms·
No, the article was right. You can't do a generic swap without 3 deep copies. If you change temp to be a reference, then once you do "arg1 = arg2", you just l
by jjnoakes 12y ago
No, the article was right.
You can't do a generic swap without 3 deep copies.
If you change temp to be a reference, then once you do "arg1 = arg2", you just lost any way to get arg1's value back.