Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-04-18 23:23:12


"Phil Nash" <phil.nash.lists_at_[hidden]> wrote in message
news:010901c1e727$0fb22b00$6935883e_at_TimeMachine...
> Since suggesting something along these lines last year, I have
> personally had to write many such wrapper facades and wishing I'd
spent a
> little more time working on scoped/auto_resource.
> Of course, writing them is less trivial that it sounds at first, as
is the
> case with the smart pointers, and, IMHO, involves potentially more
> complexity than the smart pointers.

I guess I start sounding like a broken record here :o). Loki::SmartPtr
was especially designed to accomodate non-pointer resource. That's why
StoragePolicy defines two types, namely StoredType and PointerType.
They can be distinct in the case of facades.

Also, the StoragePolicy can hold additional state (the afferent
pointer to function).

Andrei


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