monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Copy-on-write not mandated! (Was: Typesafe VA_ARGS repl


From: Clemens Hintze
Subject: [Monotone-devel] Copy-on-write not mandated! (Was: Typesafe VA_ARGS replacement for database::execute/fetch)
Date: Sun, 22 Jan 2006 08:53:45 +0100
User-agent: Mozilla Thunderbird 1.0 (X11/20050213)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]