Debian Codegraph @

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

raw
1 // PR c++/53137
2 // { dg-do compile { target c++11 } }
3
4 template <typename STORE>
5 void getParent(STORE& tStore)
6 {
7 }
8
9 struct Store
10 {
11 template <typename CheckParentFunc>
12 void updateChildCommon(CheckParentFunc c)
13 {
14 c();
15 }
16
17 template <typename T>
18 int& getStore();
19
20 template <typename T>
21 void updateChild(const T& obj)
22 {
23 updateChildCommon([this] () { getParent(getStore<T>()); });
24 }
25
26 void update(int obj);
27 };
28
29 void Store::update(int obj)
30 {
31 updateChild(obj);
32 }