From: Howard Hinnant (hinnant_at_[hidden])
Date: 2002-04-30 16:28:36
On Tuesday, April 30, 2002, at 03:31 PM, Beman Dawes wrote:
> The assumption was, I think, that a single policy-based smart pointer
> would be able to cover a great deal of such a feature model.
> Another point to bear in mind is that the status reports aren't like a
> agreed upon communiqué from a meeting of heads of state. They are just
> one person's view what was said, and that person was moderating the
> discussion, trying to understand the discussion, take notes, and
> participate, all at the same time.
> But overall it is clear that LWG members are uncomfortable with the
> current proposal, and are very interested in a policy-based approach.
As one of the lwg members who expressed some concern at the meeting, I
would like to clarify my position. Please note that I'm representing
only myself, and not any other lwg members.
Yes, I'm interested in a policy-based approach. But I'm also interested
in the proposed scoped/shared_ptr.
My biggest concern is that we not standardize a (set of) smart pointers,
and then discover a year or two down the road that we standardized the
wrong smart pointers. This area appears to me to be quite active, and
without a wide consensus on the best approach. I may be mistaken in
this, but that is my current impression. Therefore I am wanting to move
cautiously and judiciously in this area. But I *do* want to move. I am
most grateful to all of those who are putting so much work in to all of
the smart pointer libraries.
Policies or not, open issues in my mind are:
1. template typedef's are a probable future language feature. Assuming
we have that, how does that change the picture? Are there unforeseen
issues with template typedef's that will make them more or less useful
2. How will the introduction of move semantics affect smart pointers?
I can easily see a use for a smart pointer with no copy semantics, but
move semantics. Such a smart pointer might be a very good object to
hold a pointer in a container (a sufficiently move-aware container).
3. Should we be looking at smart object holders, and pointers are just
a special case? Or would this turn into a kitchen sink class with way
too big of an interface? Thinking down this path feeds into Dave's
recent post about policy being dependent upon value_type. For example
if the value_type is a pointer, then you do smart pointer things. If
the value_type is an array, then you do smart pointer to array things.
If the value_type is a FILE* you do file things. If the value_type is a
mutex, you do mutex things. etc. Not saying this is how things should
be. Just busy opening cans of worms. ;-)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk