Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2004-08-27 12:47:39


On Aug 27, 2004, at 11:15 AM, Bronek Kozicki wrote:

> Howard Hinnant wrote:
>> I can see the utility of something like this. Perhaps we are talking
>> about two different kinds of smart pointers, neither inherently
>> better than the other. Sometimes you need hatchet, sometimes you
>> need a carving knife.
>
> maybe we could use partial template specialization for this? And even
> for third one, where deleter object is copied into smart pointer, as
> it is in shared_ptr?

I think you are essentially turning it into a policy-based smart
pointer design - not that there's anything wrong with that.

I'd like to see (or create for myself) a feature/cost comparison
between:

1. pointer<T, D> - holds a compressed_pair<T*, D>
2. pointer<T>(t, d) - trampoline function design
3. pointer<T>(t, d) - internal copy design (a-la shared_ptr)

That's probably a non-trivial task...

-Howard


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