summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/implicit5.C
blob: d25294831e3b38195fbab1bec9815b6440e65fc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Test that the default B copy constructor calls the deleted A
// copy constructor.
// { dg-options -std=c++0x }

struct A			// { dg-message "declares a move" }
{
  A() = default;
  A(A&&) = default;
  template <class T>
  A(const T& t) { t.i; }
};

struct B: A { };		// { dg-error "implicitly|use of deleted" }

int main()
{
  B b;
  B b2(b);			// { dg-error "deleted" }
}