
14 Dec
2005
14 Dec
'05
8:31 p.m.
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* ).