Boost logo

Boost :

From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2002-04-29 02:22:07

"Phil Nash" <phil.nash.lists_at_[hidden]> wrote in message

> When I brought up the matter of a smart_resource before it was pointed out
> to me that Loki::SmartPtr already caters to such a need. But my real
> at the time was that, while smart_resource and smart_ptr certainly have a
> lot in common (and could be implemented one in terms of the other,
> it would seem a mistake to implement smart_resource in terms of
> they are sufficiently different entities to deserve first class seperation
> of identity. This I believe, directly impacts the complexity of the
> interaction between policies (not vastly, but enough).

In my expirience the only difference was *name* of storage_policy types.
Could you list those differences that you mention?

> More importantly they are, IMHO, solving similar, yet subtly different
> semantic issues. I know this is open to interpretation but it does strike
> as a symptom of over design.

Could you list those differences that you mention?

> I think this has been brushed under the carpet a lot, but following the
> dialog mostly between Andrei and Gennadiy the issue came up several times
> where the smart_resource aspects of smart_ptr had been overlooked, or
> was an awkward naming issue depending on whether we were dealing with
> pointers or general resources.
> I am prepared to accept that I am alone in having reservations about using
> smart_ptr to manage non-pointer resources (as opposed to having a discreet
> smart_resource class), and if everyone else is happy with this I will
> it up no more. However, nobody has, AFAICS explicity said this yet.
> FWIW, my view of a separate smart_resource does not preclude the sharing
> individual existing smart_ptr _policies_, where appropriate.

Could you specify in details how smart_resource class will be different from

> Regards,
> [)o
> IhIL..



Boost list run by bdawes at, gregod at, cpdaniel at, john at