
Alexander Terekhov <terekhov@web.de> wrote:
Maxim Yegorushkin wrote: [...]
Here is the link: http://conststring.sourceforge.net/
"The mutability of std::basic_string<> and its interface do not allow implementers to make it a lightweight value object with cheap copy operation through string representation sharing and copy-on-write technique while maintaining thread safety."
This claim borders on blatant FUD. Claims to the extent that std:: string is sorta "less thread-safe then char[]" don't hold water because there isn't non-const overload of operator[] for char[].
Or am I just missing something?
May be the quoted statement is not clear, but it states that a COW std::string can not be made thread safe due to its interface. A good discussion of the subject you can find here: http://groups.google.com/groups?ie=UTF-8&threadm=31c49f0d.0409070901.4e7a0aa6%40posting.google.com -- Maxim Yegorushkin