Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 1999-12-01 11:31:11


From: Andy Glew <glew_at_[hidden]>

> When I see a relatively small set of semantics, but a large set of possible
> implementations, each with differing advantages, my reaction is to
> parameterize:
>
> template<class T, class Implementation=shared_ptr_implementation>
> class shared_ptr : shared_ptr_implementation<T> {
> ...
> }

I've been backing into this one for years. One of my committee
proposals had counted_ptr parameterized on an allocator, an idea
whose time may have come.

However, cyclic_ptr, shared_ptr, and weak_ptr do not have the
same semantics.


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