Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this2.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/43856 |
2 // Test for implicit 'this' capture via rewriting. | |
3 // { dg-do compile { target c++11 } } | |
4 | |
5 struct S1 { | |
6 int operator()(int); | |
7 int i; | |
8 void g(); | |
9 void f() { | |
131 | 10 [=]() { // { dg-warning "implicit capture" "" { target c++2a } } |
111 | 11 i; |
12 g(); | |
13 S1::g(); | |
14 operator()(42); | |
15 }; | |
16 } | |
17 }; |