|
Boost : |
From: cppljevans_at_[hidden]
Date: 2003-10-30 08:22:30
On 10/28/2003 04:18 PM, cppljevans_at_[hidden] wrote:
[snip]
> I looked for template parameters in smart_ptr.hpp and found the
> declarations:
>
>
> template <typename> class StoragePolicy = scalar_storage
> template <typename> class OwnershipPolicy = ref_counted,
[snip]
>
> However, the shared_storage template class has a reference count;
> hence, it seems like it ought to be an OwnershipPolicy since the
> above OwnershipPolicy defaults to ref_counted. So should
> shared_storage be renamed as shared_ownership?
I beginning to think Ownerhship and Storage should be merged into
a general template, OwnerStoragePolicy, that can be specialized
based on the Ownership and Storage policies. The shared_storage and
my policy_referent_ptrs.hpp file which I recently uploaded in the
cyclic_smart_ptr.zip file both support this conclusion. Also, I'm
thinking that if the Ownership pointer and scalar_storage pointer
are the same, then that's an intrusive pointer; hence, the
specialization would be an intrusive pointer. I also tried
deriving a refcycle_counted from the policy_ptr ref_counted and
discovered it would be easier if these 2 policies were merged.
It seems maybe that was anticipated when you put both in the
same branch of the optimally_inherit branch of the smart_ptr
super class. Does that sound right?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk