Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-10-20 15:40:19


Rob Stewart wrote:
> What if the class had the option, at least, to hold multiple
> forms, creating each on demand? Then, the operations you invoke
> would simply request the particular form they require. If that
> form is not currently available, it is generated.

The classic problem is that logically const operations are now physically
non-const (as I was surprised to learn from Howard Hinnant, this is the case
with std::locale.)

The implicit thread safety contract ("basic thread safety") says that unless
stated otherwise, several logically const operations can be performed
concurrently. This would now require a mutex lock.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk