Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-neg.C

raw
1 // { dg-do compile { target c++11 } }
2
3 int main() {
4 int i = 0;
5 int& r = [&] () { return i; } (); // { dg-error "" "invalid initialization of non-const reference of type .int&. from a temporary of type .int." }
6
7 return 0;
8 }
9