Subject: Re: [boost] [move][unique_ptr] c++14 unique_ptr comes to town
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2014-08-28 15:58:58
El 28/08/2014 2:02, Peter Dimov escribió:
> unique_ptr(pointer p, const A& d);
> unique_ptr(pointer p, A&& d);
> (and it seems that you do) deleter rvalues will always bind to A const&
> in C++03, never to rv<A>, as we saw in the recent thread. So it seems that
> unique_ptr<T>( p, D() )
> will fail for a movable, noncopyable, D.
> unique_ptr<T>( p, move(d) )
> will work though.
Yes, thanks for pointing out that. For movable only types in C++03 using
Boost.Move, we can detect that using an internal tag and change the
signature to something that accepts rvalues, maybe (not tested). I'll
add this to the to-do list.