aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this2.C
blob: ce4bda458c8a4cc6ff400958cd37e176d6417bc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/43856
// Test for implicit 'this' capture via rewriting.
// { dg-options "-std=c++0x" }

struct S1 {
  int operator()(int);
  int i;
  void g();
  void f() {
    [=]() {
      i;
      g();
      operator()(42);
    };
  }
};