From: Ian Bruntlett (Ian.Bruntlett_at_[hidden])
Date: 2000-03-30 02:54:57
> 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.
> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk