From: Beman Dawes (beman_at_[hidden])
Date: 2000-03-08 08:26:06
At 05:05 AM 3/8/00 -0500, Kevin Atkinson wrote:
>Hopefully now that you finally understand the point of these classes
>can understand the more generic code.
Let's make sure I understand the ideas first.
In CopyPtr, you are introducing two smart pointer techniques:
1) Deep copy semantics. The current boost smart pointers used
shallow copy semantics. It isn't that one set of semantics is better
than the other; both have their appropriate uses.
2) Incomplete type support via implementation in a separate header
of member functions requiring complete types. This can lead to
better designs by keeping implementation details opaque (hidden
behind an incomplete type) and reducing compilation
The two techniques are somewhat orthogonal. Incomplete type support
is particularly appropriate for deep copy semantics, but it could
also be used in variations of the current boost smart pointers so
they could work with opaque types having non-trivial destructors.
In other words, it would be complete (although not necessarily
desirable) to have:
deep_opaque_ptr // also known as CopyPtr
shared_ptr // same as current
scoped_ptr // same as current
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk