This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Something like (untested, sorry)Yes, this one "works", in the sense that if I apply my patchlet the first assert fails at run-time.
D d; std::unique_ptr<T,D&> p1( new T, d );
std::shared_ptr<T> p2( std::move( p1 ) );
typedef std::reference_wrapper<D> D2; D2 * p3 = std::get_deleter<D2>( p2 );
assert( p3 != 0 ); assert( &p3->get() == &d );
Thanks a lot, I will add it to the testsuite! Paolo.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |