------- Comment #38 from james dot kanze at gmail dot com 2007-05-08 16:21 ------- Subject: Re: Lack of Posix compliant thread safety in std::basic_string
On 8 May 2007 05:24:35 -0000, gianni at mariani dot ws <[EMAIL PROTECTED]> wrote: > ------- Comment #36 from gianni at mariani dot ws 2007-05-08 06:24 ------- > BTW - you don't need a multi-threaded test to make this problem show up. > The code below is plain old C++ and breaks. Again, I hesitate > in calling this one a bug because begin() on a non-const > object make be "allowed" to invalidate previous const > iterators, I'm not sure. In this case, the standard specifically says that the code is invalid. (For all of the standard containers, the standard specifies what operations invalidate iterators.) > If it is not allowed to then this is > a legitimate bug - no threads needed. BTW, this test works on: > "Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42" As does my example:-). Different implementations will behave differently. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21334