Subject: Re: [boost] scoped_ptr deleter
From: Dmitry Goncharov (dgoncharov_at_[hidden])
Date: 2009-09-16 02:46:01
Andrey Semashev wrote:
> Noncopyable nature doesn't mean its type is insignificant. This change
> would break the interface as the following code won't work anymore:
> template< template< typename > class Ptr >
> void make_a(Ptr< A >& p);
> scoped_ptr< A > p;
> This may not be the most frequent use pattern but nonetheless it's valid.
> I'd opt for this change if it wouldn't affect the interface in the
> breaking way. Otherwise, I like the way it is.
The difficulty that your example demonstrates is caused by the nature of
template template parameters. scoped_ptr should not be blamed for that.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk