3 ms·
Copy-and-swap/move is fun and all, but what they don't point out to you about it is that it prevents the base class operator= from being called when there's inh
by dataflow 4y ago
Copy-and-swap/move is fun and all, but what they don't point out to you about it is that it prevents the base class operator= from being called when there's inheritance (because it's bypassing operator= entirely).
i.e. it might be fine at the app-level since you might know all your callers in that case, but you shouldn't do it in a library that others might want to use, or your code will behave erratically.
- deleted 4y ago[deleted]