[RFC] Strange line at the end of _M_mutate
Nathan Myers
ncm-nospam@cantrip.org
Sun Dec 16 12:12:00 GMT 2001
On Sun, Dec 16, 2001 at 08:54:12PM +0100, Paolo Carlini wrote:
> Nathan Myers wrote:
>
> > The first comment is obsolete; the requirement is now that _CharT()
> > appear whenever s[s.size()] is examined, regardless of the cost.
>
> Thanks for your interesting reply. Therefore, in particular, if I
> understand well what you are saying:
> 1- My two additional testcases for assign are ok (_M_mutate did put that
> _CharT() too early in the _Rep before the recent changes to the library).
> 2- We should carefully check that, anytime the lenght of a string changes,
> a _CharT() goes with that. In particular the new pair of assign, should
> be amended in this way for the "work in place" case.
Sounds good to me. The easy way would be to just copy an extra character,
and assume it hasn't been poked out. I don't know if that would be best.
Nathan Myers
ncm at cantrip dot org
More information about the Libstdc++
mailing list