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

2012-04-11 Thread abdul.tohmaz at emc dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938 Bug #: 52938 Summary: std::string::reserve request is not maintained if object is used in other object copy ctore Classification: Unclassified Product: gcc Version: 4.6.1

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

2012-04-11 Thread abdul.tohmaz at emc dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938 --- Comment #2 from Abdul Tohmaz 2012-04-11 20:32:26 UTC --- (In reply to comment #1) > Why do you think this is a bug? I don't see why x="aaa"; would not change the > reserve. > > The main reason why it changes the reserve is that the backin

[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 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. string x; x.reserve(1024); //n

[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 changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|WONTFIX

[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 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-12 Thread abdul.tohmaz at emc dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938 --- Comment #12 from Abdul Tohmaz 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 stable and effectively frozen

[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 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 call swap() to > exchange