Boost logo

Boost :

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;
> make_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.

BR, Dmitry

Boost list run by bdawes at, gregod at, cpdaniel at, john at