On 07/04/2010 04:19 PM, nielsdek...@xs4all.nl wrote: > Do I understand correctly that the current GCC implementation of > std::string is non-conforming, because it does ref-counting + > copy-on-write? If you mean by non-conforming "non-conforming to the not existing yet new C++ standard, so far known as C++0x", the answer is yes. > If so, is there some compiler flag to switch to a conforming > (non-ref-counting) std::string implementation? Nope. > If I understand well, the Versatile String, __versa_string from > <ext/vstring.h> provides such an implementation, right? Is there an > easy way to recompile existing user code that uses std::string, in > order to switch to a non-ref-counting implementation? Nothing special, no. And of course that code is just a starting point. Before advertising is a "conforming" (in the sense above) implementation has to be reviewed, some optimizations added, etc...
Paolo.