]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv11.C
trans.c (check_inlining_for_nested_subprog): Quote reserved names.
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp0x / lambda / lambda-conv11.C
1 // PR c++/71105
2 // { dg-do compile { target c++11 } }
3
4 void foo()
5 {
6 int i;
7 static_cast<void(*)()>([i]{}); // { dg-error "invalid 'static_cast'" }
8 static_cast<void(*)()>([=]{}); // { dg-error "invalid 'static_cast'" }
9 static_cast<void(*)()>([&]{}); // { dg-error "invalid 'static_cast'" }
10 }