From: Kevin Atkinson (kevinatk_at_[hidden])
Date: 2000-03-30 03:16:41
On Thu, 30 Mar 2000, Ian Bruntlett wrote:
> > So then pass in a class with 2 members one "free" and another
> > "is_null". This will then extend better to other smart pointers types
> > then writing a specific methods for auto pointer.
> Thank you, that's a good idea. For a smart resource, I'd prefer a different
> name to "is_null" - its got a definite "pointer" tone to it.
How about is_nill?? What than?
> > You are looking for an interface. I am looking for a general method to
> > extend all smart pointers. That general method in my view is to pass in a
> > class with the necessary information so that the smart pointer can do its
> > job. For most pointers this means one to free the resource and another to
> > tell if it is null. For some resources there is no null and
> > auto_resource should then insists that the resource is always pointing to
> > something valid.
> That's a complication I hadn't considered. I'd want an auto_resource<> to be
> able to deal with that.
> > Also, you are also repeatedly ignoring the fact that you specializations
> > won't work one the compiler can't tell one resource from another because
> > there are both represented by an integer!
> Sorry, I thought I'd already acknowledged that in a previous reply.
So you agree that specialation will not always work?
--- Kevin Atkinson kevinatk_at_[hidden] http://metalab.unc.edu/kevina/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk