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

struct A {
  A(A&&) = default;		// { dg-message "A::A|no known conversion" }
};
struct B {
  const A a;
  B(const B&) = default;
  B(B&&) = default;		// { dg-error "implicitly deleted|no match" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 10 }
};

void g(B);			// { dg-error "argument 1" }
B&& f();

int main()
{
  g(f());			// { dg-error "deleted" }
}