------- Comment #7 from poftwaresatent at gmail dot com 2010-04-03 01:38 ------- So, looks more like a documentation issue then, fine by me.
Quote from basic_string.h: "Removes the characters in the range [pos,pos + n1) from this string. In place, the first @a n characters of @a s are inserted." I interpreted that as meaning "when s is longer than n, just use the first n characters of it and disregards whatever follows." Similarly, Josuttis (pg 519 of 10th printing) says: "Both forms replace, at most, len characters of *this..." Thanks for the quick reply! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43634