Re:Copying data is wasteful, mutating data is dangerous
by zabzonk on Thursday January 09, 2020 @06:02PM
(#22006820)
> Does it manifest itself in the standard library as well?
Yes. For example for std::string `a = a + b;` will (at least notionally) create a temporary string and then use the assignment operator. `a += b;` will not do this.
Yes. For example for std::string `a = a + b;` will (at least notionally) create a temporary string and then use the assignment operator. `a += b;` will not do this.