1 2 3 4 5 6 7 8 9 10 11 12 13
// { dg-do compile { target c++26 } } #include <memory> struct Incomplete; std::polymorphic<Incomplete>* test_move(std::polymorphic<Incomplete>& i1, std::polymorphic<Incomplete>& i2) { i1 = std::move(i2); swap(i1, i2); return new std::polymorphic<Incomplete>(std::move(i1)); }