summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this17.C
blob: b7cdf31c46bb8381f71a9dc5cb702a8792856955 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PR c++/58481
// { dg-require-effective-target c++11 }

struct Test {
  template<typename... Args> inline void triggerTest (Args&&... fargs) { } 
};

struct TestPickled : Test {  
  template<typename... Args> void triggerTest (Args&&... fargs) { 
    [=](Args... as) { // { dg-warning "implicit capture" "" { target c++2a } }
      Test::triggerTest (as...);
    } ();		
  }
};

int main()
{
  TestPickled test;
  test.triggerTest ();
  return 0;
}