basic_string - once more...
Stefan Olsson
stefan@noname4us.com
Mon Nov 12 04:59:00 GMT 2001
Ok, without any safety-net at all I will test this out and post my findings to the
list later on ;-)
/Stefan
Paolo Carlini wrote:
> Stefan Olsson wrote:
>
> > Hey!
> >
> > Yes, I saw that as well, but a bit later in that same thread there seems to be
> > disagreement about where this should be done and I don't feel that I have enough
> > knowledge (yet...) to comment on this...
> >
> > http://gcc.gnu.org/ml/libstdc++/2001-07/msg00086.html
>
> As regards this part:
>
> >_Rep::_S_create is a wrong place to do that. If one calls reserve(1024) he is
> >expecting to prealloc 1024 bytes not 4096.
>
> this is not a problem at all, if we like the implementation for other reasons. See
> 21.3.3.11: "After reserve the capacity is *greater* or equal..." (emphasis mine).
>
> Cheers,
> Paolo.
--
Military intelligence is a contradiction in terms.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20011112/e8f230de/attachment.htm>
More information about the Libstdc++
mailing list