2 ms·
If you pass a pointer (or anything with reference semantics) by value you can still get non local mutation through it without obvious call site syntax. There i
by gpderetta 3y ago
If you pass a pointer (or anything with reference semantics) by value you can still get non local mutation through it without obvious call site syntax.
There is no perfect solution. Avoid out parameters if possible, otherwise make the semantics clear via function naming or at least parameter naming conventions.