Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/defaulted20.C

raw
1 // PR c++/46497
2 // { dg-do compile { target c++11 } }
3
4 struct A {
5 A(A&&) = default;
6 };
7 struct B {
8 const A a;
9 B(const B&) = default;
10 B(B&&) = default; // { dg-error "implicitly deleted|use of deleted" }
11 };
12
13 void g(B); // { dg-message "argument 1" }
14 B&& f();
15
16 int main()
17 {
18 g(f()); // { dg-error "deleted" }
19 }