http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48257
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-03-23 19:39:28 UTC --- In C++03 see 21.3.5.3 [lib.string.assign] paragraph 6 where string::assign(const char* s, size_t n) is defined to return assign( string(s, n) ) and that constructor: Constructs an object of class basic_string and determines its initial string value from the array of charT of length n whose first element is designated by s, In C++0x the requirement is explicit, [string::assign] paragraph 8 says Requires: s points to an array of at least n elements of charT.