3 ms·
pointer would be pointing at internal structure memory, it would need to change on every copy then.
by barrkel 9y ago
pointer would be pointing at internal structure memory, it would need to change on every copy then.
- mehrdadn 9y ago> pointer would be pointing at internal structure memory, it would need to change on every copy then. Sure, sounds fine to me. What's wrong with this? The pointer would need to change on every copy anyway, since it'd need to point to a new buffer even if it were pointing to the heap.
- barrkel 9y agoIt sounds fine from a C++ world of copy constructors. I think copy constructors aren't worth the exception safety downsides.
- mehrdadn 9y agoI don't understand. I asked why there is a mandatory branch, you said otherwise the pointer would need to change on every copy, I said that's fine, and now you rebutted that copying isn't even worth it? So what is the problem and where is the extra branch? I don't understand where the discussion is going.