Boost logo

Boost :

Subject: [boost] (no subject)
From: Berserker (berserker_r_at_[hidden])
Date: 2009-09-16 04:29:45


Dmitry Goncharov wrote:

> The difficulty that your example demonstrates is caused by the nature
> of
template template parameters. scoped_ptr should not be blamed for that.

I agree, moreover I think that the advantages of this patch (often required in the list) justify the 1% use cases of Andrey Semashev's sample that in my opinion can be simplified in this way:

template<typename T, typename P>
void make_ptr(P &p)
{
    p.reset(new T());
}

_________________________________________________________________
Scopri tutti i servizi Windows Live, guarda i video
http://www.windowslive.it/videoGallery.aspx


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