Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc.C

raw
1 // Test that error messages about creating the closure object refer to
2 // the lambda-introducer.
3 // { dg-do compile { target c++11 } }
4
5 struct A
6 {
7 A();
8 A(const A& a) = delete; // { dg-message "declared" }
9 };
10
11 int main()
12 {
13 A ar[4][3];
14 [ar] { }; // { dg-error "3:" }
15
16 A a;
17 [a] { }; // { dg-error "3:" }
18 }