From: Beman Dawes (bdawes_at_[hidden])
Date: 2004-03-01 12:18:16
At 12:32 PM 2/10/2004, Jody Hagins wrote:
>On Tue, 10 Feb 2004 11:10:22 -0600
>Slawomir Lisznianski <slisznianski_at_[hidden]> wrote:
>> Do we sacrifice platforms that do not support atomic instructions
>> then? ;-) I was faintly aiming to show a bigger picture, hence my
>> proposal for locking policy. IMHO, overriding operator= is a valuable
>> alternative, but puts an ado on users.
>I agree that a template parameter describing the locking policy is a
>much better solution. It provides all users of shared_ptr with what
>they want, and it does not cost anything for the times when a lock is
One difficulty with a locking-policy template parameter is that it changes
the shared_ptr's type. This is a problem with passing the shared_ptr to a
third-party or other library component which expects a different type.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk