Nathaniel Smith wrote:
On Sat, Jan 21, 2006 at 03:11:51AM -0600, Timothy Brownawell wrote:

(...)

Aren't strings copy-on-write anyway, so this shouldn't be a problem?


Oh, hrm.  That's a clever point.

Sorry for bothering, but - while it is true, that the C++ standard was written in a manner that allow copy-on-write technics for implementation of basic_string, it does not mandate to do so!

Further it seems, that there are situations, where copy-on-write will behave worser than a simple plain implementation - thread safety comes to mind. See for example

   http://www.gotw.ca/publications/optimizations.htm

In this light it could not being impossible, that STL vendors could leave the copy-on-write path.


Best regards,
Clemens.


_______________________________________________
Monotone-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to