Wrap semantics and string performance

I read somewhere that the new standard power moves semantics in the implementation of the string class. Right now, compilers such as gcc, for example, implement strings as copies for writing in order to improve performance, this makes copying and passing strings as parameters at a cost very cheap. Now, if moving semantics for copying strings is now mandatory, doesn't that lose performance ?. Because if it’s true that it will be cheap to transfer lines moving them between areas, you still have to make a copy if / when copying a line, right?

Can someone clarify this issue for me?

Thanks.

+4
source share

All Articles