|
|
|
|
|
by flohofwoe
559 days ago
|
|
> at least not in the sense that the actual content of the string was copied anywhere ...unless it's a short string within the limits of the small-string-optimization capacity. I think what confuses many people is that a C++ move assignment still can copy a significant amount of bytes since it's just a flat copy plus 'giving up' ownership of dangling data in the source object. For a POD struct, 'move assignment' and 'copy assignment' are identical in terms of cost. |
|