summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/std/memory/polymorphic/incomplete.cc
blob: e5dd78f13fe5b9a4f5536f63773a693e432e26f4 (plain)
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));
}