Namespaces
Variants
Actions

Talk:cpp/string/basic string/operator+=

From cppreference.com

It seems the output of the example is wrong. There should be an empty line in the front. 83.171.31.167 23:20, 26 January 2015 (PST)

[edit] complexity guarantees

Why does this page give complexity guarantees when http://en.cppreference.com/w/cpp/string/basic_string/append states "There are no standard complexity guarantees"? 69.191.176.31 07:41, 30 September 2016 (PDT)

because when someone corrected append, they didn't touch this page and nobody else noticed the discrepancy. The spec for string::append() does use the word "copy" for each character involved ("first size() elements are a copy" and "remaining elements are a copy"), so I think it's fair to say "linear", that change to append() may have been unnecessarily pessimistic. --Cubbi (talk) 08:11, 30 September 2016 (PDT)
close