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
PR c++/86728 - C variadic generic lambda.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
conversion
/
pr16333.C
blob
a00bc5c167c4ed6250e4160b2614e742a271b8ee
1
// PR c++/16333
2
3
struct X {
4
X (const int (&)[3]);
5
};
6
7
int a[3];
8
X foo1 () { return a; }
9
const X &foo2 () { return a; } // { dg-warning "returning reference to temporary" }
10
X &foo3 () { return a; } // { dg-error "cannot bind non-const lvalue ref" }