// { dg-do compile { target c++11 } } // { dg-require-effective-target hosted } #include // LWG 3548 // shared_ptr construction from unique_ptr should move (not copy) the deleter struct D { D() { } D(D&&) { } void operator()(int* p) const { delete p; } }; std::unique_ptr u; std::shared_ptr s1(std::move(u));