http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-11 21:08:16 UTC --- N.B. you can get the behaviour you want by calling reserve after creating y std::string x; std::string y(x); x.reserve(20); /// x capacity is 20