PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / conversion / pr16333.C
bloba00bc5c167c4ed6250e4160b2614e742a271b8ee
1 // PR c++/16333
3 struct X {
4    X (const int (&)[3]);
5 };
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" }