Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-09-02 08:41:14


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
>
> That's why in my implementation (after staring at the current
> shared_ptr::reset() code for a while) I simply used
>
> void reset(T * p = 0)
> {
> shared_ptr(p).swap(*this);
> }

Because it's a simple way to do what the shared_ptr spec. says?

-Dave


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