Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-12-14 15:31:18


Yuval Ronen wrote:

> I just thought that if we combine this with the conclusion of the
> discussion about temporary auto_ptrs being passed to shared_ptr
> constructors (with the '.release()'), then the result is that I can't
> assign a temporary auto_ptr to a shred_ptr.
>
> If I had a reset(auto_ptr<Y> &), then I could call it with .release(),
> but since all I have is operator=(auto_ptr<Y> &), I can't use
> .release(), as I don't have operator=(Y*).
>
> No temporary auto_ptrs for me... :-(

You can use px.reset( function().release() ), as there is a reset( Y* ).


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