[Bug libstdc++/52938] std::string::reserve request is not maintained if object is used in other object copy ctor

2012-04-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938 --- Comment #13 from Jonathan Wakely redi at gcc dot gnu.org 2012-04-13 08:31:13 UTC --- The user could care less if we use copy-on-write in the string implementation. The standard doesn't force that (21.3.6). But it does allow it. We

[Bug libstdc++/52938] std::string::reserve request is not maintained if object is used in other object copy ctor

2012-04-13 Thread abdul.tohmaz at emc dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938 --- Comment #14 from Abdul Tohmaz abdul.tohmaz at emc dot com 2012-04-13 13:37:47 UTC --- (In reply to comment #13) Immediately after you call reserve it returns at least 1024. But not necessarily from that point on for ever and ever. If you

[Bug libstdc++/52938] std::string::reserve request is not maintained if object is used in other object copy ctor

2012-04-12 Thread abdul.tohmaz at emc dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938 --- Comment #12 from Abdul Tohmaz abdul.tohmaz at emc dot com 2012-04-12 23:07:32 UTC --- (In reply to comment #11) The benefits and problems of reference-counted strings are well known and it's not going to be changed now, std::string is

[Bug libstdc++/52938] std::string::reserve request is not maintained if object is used in other object copy ctor

2012-04-11 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug libstdc++/52938] std::string::reserve request is not maintained if object is used in other object copy ctor

2012-04-11 Thread abdul.tohmaz at emc dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938 --- Comment #6 from Abdul Tohmaz abdul.tohmaz at emc dot com 2012-04-11 23:50:21 UTC --- Guys, I do value your points, but please consider the following: I can't always be in control when a copy is made of my string. Here is a quick example.

[Bug libstdc++/52938] std::string::reserve request is not maintained if object is used in other object copy ctor

2012-04-11 Thread abdul.tohmaz at emc dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938 Abdul Tohmaz abdul.tohmaz at emc dot com changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED

[Bug libstdc++/52938] std::string::reserve request is not maintained if object is used in other object copy ctor

2012-04-11 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938 --- Comment #8 from Paolo Carlini paolo.carlini at oracle dot com 2012-04-11 23:57:34 UTC --- What we tried to explain is that this sort of issue is well known and, more or less, affects *any* reference counted implementation (I'm pretty sure you

[Bug libstdc++/52938] std::string::reserve request is not maintained if object is used in other object copy ctor

2012-04-11 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug libstdc++/52938] std::string::reserve request is not maintained if object is used in other object copy ctor

2012-04-11 Thread abdul.tohmaz at emc dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938 --- Comment #10 from Abdul Tohmaz abdul.tohmaz at emc dot com 2012-04-12 00:11:34 UTC --- Thanks for the clarification, I will switch to ext/vstring.h...

[Bug libstdc++/52938] std::string::reserve request is not maintained if object is used in other object copy ctor

2012-04-11 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938 --- Comment #11 from Jonathan Wakely redi at gcc dot gnu.org 2012-04-12 00:22:01 UTC --- (In reply to comment #7) Don't you think this is a problem? I called reserve on x to avoid memory reallocation, and yet I am faced with memory