Rebase.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / lambda / lambda-conv8.C
blobabe272a8b8b717aa1b6ca9332c471467a5b513ce
1 // PR c++/56447
2 // { dg-do compile { target c++11 } }
4 template <class T>
5 void f()
7   int i;
8   // This lambda should not have a conversion op, since it captures i
9   int (*p)() = [=]{ return i; }; // { dg-error "cannot convert" }
12 int main()
14   f<int>();