repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge with main truk.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
defaulted20.C
blob
affda20fdd4256bfc1fed4ca5cb06520d344e2d7
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-error "argument 1" }
14
B&& f();
15
16
int main()
17
{
18
g(f()); // { dg-error "deleted" }
19
}