28 Aug
2014
28 Aug
'14
8:26 p.m.
Ion GaztaƱaga wrote:
85 template <class U> 86 unique_ptr_data(P p, BOOST_FWD_REF(U) d) BOOST_NOEXCEPT 87 : m_p(::boost::forward<U>(p)), d(::boost::forward<U>(d)) 88 {}
It's not clear to me why you need this constructor (in addition to the two others), and it's wrong - forward<U>(p) isn't likely to work.
Apart from the useless "forward<>()" (which I think will work as pointers are not move-enabled),
Unless forward<U> ignores U, I don't see how it would work. The type of the pointer is P, not U, which is not likely to be the same.