3 ms·
But if something is passed by value, the caller should never care whether the callee mutates its (shallow) copy. It's purely an unobervable implementation detai
by Ericson2314 6y ago
But if something is passed by value, the caller should never care whether the callee mutates its (shallow) copy. It's purely an unobervable implementation detail of the function.
- gumby 6y agoCall by value is not that common any more in C++ except with scalars. Although there are legit cases for what you describe, it’s a pretty uncommon case.
- Ericson2314 6y agoNot passing things around by value doesn't solve the problem. For example, template machinery has worry about absurd things like `const .. &&`.