Boost logo

Boost :

From: Phil Nash (phil.nash.lists_at_[hidden])
Date: 2003-02-20 07:23:19


"Gennadiy Rozental" <gennadiy.rozental_at_[hidden]> wrote in message
news:<b2vm7o$3bn$1_at_[hidden]>...
> > In that fashion it makes sense. But the only smart_ptr that will
> > make any sense is scoped_ptr. Which will only implement idea #1.
> > As I said my classes offer far more.
>
> Under smart_ptr I meant policy pased smart pointer, that supply a wide
> variaty of ownership policies and allow you to write custom one.

Maybe this is a good point to bring up an old argument we had, Gennadiy.
That is that the raii semantics of smart_ptr are not unique to smart_ptr. Of
course we both agreed on that, but I went as far as to say that an raii
class for entities that are not actually pointers should not be handled by
smart_PTR at all - policy based or not, but rather by smart_resource (or
some other name - but not pointer!).
At the time I suggested this class should be entirely separate from
smart_ptr, but I think that could be relaxed to allowing it to be a superset
of smart_ptr (currently the loose concept of smart resource is a *sub*set of
smart_ptr, which doesn't make sense to me).

The point is that this thread has just demonstrated the confusion that
arises when you start talking about smart_ptr's in the context of something
that is not a pointer.

Much of what we had to say before can be found here:

http://aspn.activestate.com/ASPN/Mail/Message/1185126

Also, some comments from Andrei:

http://aspn.activestate.com/ASPN/Mail/Message/1183378

There was a fair bit more discussion I could track down if it was
worthwhile, but I just thought I'd bring this up again now to see if it was
thought relavent.

Regards,

[)o
IhIL..


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