This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix basic_string::reserve bug PR4548


(unpolitely replying to myself only to add a missing pointer to the Standard)

> In a nutshell (see below for details), currently, when a given string is shared
> basic_string::reserve does not adjust the requested value for its capacity()
> to a final value in any case >= the current size(). This is very bad :)

[lib.string.capacity] 21.3.3.11 (also, Josuttis pag. 486, 510, in particular "The capacity
is never reduced below the current number of characters")

Cheers,
Paolo.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]