Boost logo

Boost :

From: Ian Bruntlett (Ian.Bruntlett_at_[hidden])
Date: 2000-03-29 03:05:18


Kevin,

> > I've looked at the auto_ptr<> documentation more closely and here's how
I'd
> > suggest implementing auto_resource<> at the moment.
> > 1. Take the source for auto_ptr<> and replace auto_ptr with
auto_resource.
> > 2. Remove the implementation code for member reset()
> > 3. Remove the implementation code for member release()
>
> What exactly or you trying to do? Are you trying to control how the
object
> is destroyed? Or are you aiming for something else...

My aim is to have exception safe resources while being consistent with
existing practise.

The exception safety of auto_ptr<> is good enough for me.

And I thought I'd re-use the interface of auto_ptr<> to make life easier.

Initially, I figured that the user would have to implement the destructor.
But a closer look at auto_ptr<> revealed that its member functions are
implemented using two key member functions, reset() and release().

Ian


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