summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/implicit10.C
blob: 721a93dd57e1cfa334a2c43e9cddcd35c0991d2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/46103
// { dg-options -std=c++0x }

struct MoveOnly {
  MoveOnly(const MoveOnly&) = delete;
  MoveOnly(MoveOnly&&) { }
  MoveOnly() = default;
};

struct A {
  MoveOnly mo[1];
  A() = default;
  A(A&&) = default;
};

int main() {
  A a;
  A aa = static_cast<A&&>(a);
}