* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / pr83160.C
blobb3b97c70c3d305129dd3d046b35d5d95b9541a2b
1 // { dg-do run { target c++11 } }
2 // PR c++/83160 failed to capture as lvalue
4 int main ()
6   const int a = 0;
8   if (![&a] (const int *p)
9       {
10         const int &b = a;
11         // We should bind to the outer a
12         return &b == p;
13       } (&a))
14     return 1;
16   if (![&] (const int *p)
17       {
18         const int &b = a;
19         // We should bind to the outer a
20         return &b == p;
21       } (&a))
22     return 2;
24   if ([=] (const int *p)
25       {
26         const int &b = a;
27         // We should bind to the captured instance
28         return &b == p;
29       }(&a))
30     return 3;
32   return 0;